curl --request POST \
--url https://api.valar.space/operations/state-vectors/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": "<string>",
"format": "OPM",
"contentHash": "<string>",
"metadata": {
"comments": "<string>",
"mass": 1500,
"originator": "VALAR",
"referenceFrame": "EME2000"
},
"resolutionFingerprint": "<string>",
"spacecraftId": "spacecraft-abc-123"
}
'import requests
url = "https://api.valar.space/operations/state-vectors/import"
payload = {
"data": "<string>",
"format": "OPM",
"contentHash": "<string>",
"metadata": {
"comments": "<string>",
"mass": 1500,
"originator": "VALAR",
"referenceFrame": "EME2000"
},
"resolutionFingerprint": "<string>",
"spacecraftId": "spacecraft-abc-123"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: '<string>',
format: 'OPM',
contentHash: '<string>',
metadata: {
comments: '<string>',
mass: 1500,
originator: 'VALAR',
referenceFrame: 'EME2000'
},
resolutionFingerprint: '<string>',
spacecraftId: 'spacecraft-abc-123'
})
};
fetch('https://api.valar.space/operations/state-vectors/import', 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.valar.space/operations/state-vectors/import",
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([
'data' => '<string>',
'format' => 'OPM',
'contentHash' => '<string>',
'metadata' => [
'comments' => '<string>',
'mass' => 1500,
'originator' => 'VALAR',
'referenceFrame' => 'EME2000'
],
'resolutionFingerprint' => '<string>',
'spacecraftId' => 'spacecraft-abc-123'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.valar.space/operations/state-vectors/import"
payload := strings.NewReader("{\n \"data\": \"<string>\",\n \"format\": \"OPM\",\n \"contentHash\": \"<string>\",\n \"metadata\": {\n \"comments\": \"<string>\",\n \"mass\": 1500,\n \"originator\": \"VALAR\",\n \"referenceFrame\": \"EME2000\"\n },\n \"resolutionFingerprint\": \"<string>\",\n \"spacecraftId\": \"spacecraft-abc-123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.valar.space/operations/state-vectors/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": \"<string>\",\n \"format\": \"OPM\",\n \"contentHash\": \"<string>\",\n \"metadata\": {\n \"comments\": \"<string>\",\n \"mass\": 1500,\n \"originator\": \"VALAR\",\n \"referenceFrame\": \"EME2000\"\n },\n \"resolutionFingerprint\": \"<string>\",\n \"spacecraftId\": \"spacecraft-abc-123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valar.space/operations/state-vectors/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": \"<string>\",\n \"format\": \"OPM\",\n \"contentHash\": \"<string>\",\n \"metadata\": {\n \"comments\": \"<string>\",\n \"mass\": 1500,\n \"originator\": \"VALAR\",\n \"referenceFrame\": \"EME2000\"\n },\n \"resolutionFingerprint\": \"<string>\",\n \"spacecraftId\": \"spacecraft-abc-123\"\n}"
response = http.request(request)
puts response.read_body{
"id": "SV-456",
"spacecraftId": "550e8400-e29b-41d4-a716-446655440000",
"spacecraftName": "GS002",
"epoch": "2024-06-15T12:00:00Z",
"position": [
42164,
0,
0
],
"velocity": [
0,
3.075,
0
],
"referenceFrame": "EME2000",
"mass": 1500,
"originator": "VALAR",
"creationDate": "2024-06-15T12:30:00Z",
"sourceType": "OPM_IMPORT",
"orbitSolutionId": null,
"hasCovariance": false
}{
"timestamp": "2025-01-15T10:30:00.000Z",
"status": 400,
"error": "Bad Request",
"message": "Validation failed",
"path": "/operations/state-vectors/import",
"fieldErrors": {
"format": "Format must be one of: OPM, SPACEX_OPM"
}
}{
"error": "invalid_token",
"error_description": "An error occurred while attempting to decode the Jwt"
}{
"timestamp": "2025-01-15T10:30:00.000Z",
"status": 403,
"error": "ACCESS_ERROR",
"message": "Access denied",
"path": "/operations/state-vectors/import"
}{
"timestamp": "2025-01-15T10:30:00.000Z",
"status": 404,
"error": "Not Found",
"message": "No spacecraft found matching OPM identifiers",
"path": "/operations/state-vectors/import"
}{
"code": "import.tracking.tdm.parse_failed",
"correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"details": {},
"error": "Bad Request",
"fieldErrors": {},
"message": "Invalid spacecraft ID format",
"params": {},
"path": "/api/v1/stm/credentials",
"status": 400,
"timestamp": "2025-11-14T10:15:30.123Z"
}Import a state vector
Import a state vector from an external source (OPM or SpaceX OPM format). For OPM format, the spacecraft can be auto-resolved from OBJECT_ID and OBJECT_NAME in the CCSDS metadata when spacecraftId is omitted. SpaceX OPM format requires an explicit spacecraftId. Creates a StateVector only, not an OrbitSolution.
curl --request POST \
--url https://api.valar.space/operations/state-vectors/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": "<string>",
"format": "OPM",
"contentHash": "<string>",
"metadata": {
"comments": "<string>",
"mass": 1500,
"originator": "VALAR",
"referenceFrame": "EME2000"
},
"resolutionFingerprint": "<string>",
"spacecraftId": "spacecraft-abc-123"
}
'import requests
url = "https://api.valar.space/operations/state-vectors/import"
payload = {
"data": "<string>",
"format": "OPM",
"contentHash": "<string>",
"metadata": {
"comments": "<string>",
"mass": 1500,
"originator": "VALAR",
"referenceFrame": "EME2000"
},
"resolutionFingerprint": "<string>",
"spacecraftId": "spacecraft-abc-123"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: '<string>',
format: 'OPM',
contentHash: '<string>',
metadata: {
comments: '<string>',
mass: 1500,
originator: 'VALAR',
referenceFrame: 'EME2000'
},
resolutionFingerprint: '<string>',
spacecraftId: 'spacecraft-abc-123'
})
};
fetch('https://api.valar.space/operations/state-vectors/import', 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.valar.space/operations/state-vectors/import",
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([
'data' => '<string>',
'format' => 'OPM',
'contentHash' => '<string>',
'metadata' => [
'comments' => '<string>',
'mass' => 1500,
'originator' => 'VALAR',
'referenceFrame' => 'EME2000'
],
'resolutionFingerprint' => '<string>',
'spacecraftId' => 'spacecraft-abc-123'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.valar.space/operations/state-vectors/import"
payload := strings.NewReader("{\n \"data\": \"<string>\",\n \"format\": \"OPM\",\n \"contentHash\": \"<string>\",\n \"metadata\": {\n \"comments\": \"<string>\",\n \"mass\": 1500,\n \"originator\": \"VALAR\",\n \"referenceFrame\": \"EME2000\"\n },\n \"resolutionFingerprint\": \"<string>\",\n \"spacecraftId\": \"spacecraft-abc-123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.valar.space/operations/state-vectors/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": \"<string>\",\n \"format\": \"OPM\",\n \"contentHash\": \"<string>\",\n \"metadata\": {\n \"comments\": \"<string>\",\n \"mass\": 1500,\n \"originator\": \"VALAR\",\n \"referenceFrame\": \"EME2000\"\n },\n \"resolutionFingerprint\": \"<string>\",\n \"spacecraftId\": \"spacecraft-abc-123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valar.space/operations/state-vectors/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": \"<string>\",\n \"format\": \"OPM\",\n \"contentHash\": \"<string>\",\n \"metadata\": {\n \"comments\": \"<string>\",\n \"mass\": 1500,\n \"originator\": \"VALAR\",\n \"referenceFrame\": \"EME2000\"\n },\n \"resolutionFingerprint\": \"<string>\",\n \"spacecraftId\": \"spacecraft-abc-123\"\n}"
response = http.request(request)
puts response.read_body{
"id": "SV-456",
"spacecraftId": "550e8400-e29b-41d4-a716-446655440000",
"spacecraftName": "GS002",
"epoch": "2024-06-15T12:00:00Z",
"position": [
42164,
0,
0
],
"velocity": [
0,
3.075,
0
],
"referenceFrame": "EME2000",
"mass": 1500,
"originator": "VALAR",
"creationDate": "2024-06-15T12:30:00Z",
"sourceType": "OPM_IMPORT",
"orbitSolutionId": null,
"hasCovariance": false
}{
"timestamp": "2025-01-15T10:30:00.000Z",
"status": 400,
"error": "Bad Request",
"message": "Validation failed",
"path": "/operations/state-vectors/import",
"fieldErrors": {
"format": "Format must be one of: OPM, SPACEX_OPM"
}
}{
"error": "invalid_token",
"error_description": "An error occurred while attempting to decode the Jwt"
}{
"timestamp": "2025-01-15T10:30:00.000Z",
"status": 403,
"error": "ACCESS_ERROR",
"message": "Access denied",
"path": "/operations/state-vectors/import"
}{
"timestamp": "2025-01-15T10:30:00.000Z",
"status": 404,
"error": "Not Found",
"message": "No spacecraft found matching OPM identifiers",
"path": "/operations/state-vectors/import"
}{
"code": "import.tracking.tdm.parse_failed",
"correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"details": {},
"error": "Bad Request",
"fieldErrors": {},
"message": "Invalid spacecraft ID format",
"params": {},
"path": "/api/v1/stm/credentials",
"status": 400,
"timestamp": "2025-11-14T10:15:30.123Z"
}Body
Request for importing a single state vector
Response
State vector imported successfully
State vector representation with position, velocity, and metadata
Non-fatal validation warnings raised while importing this state vector. Empty when the import raised none. A perigee altitude below OrbitGeometryValidator.PERIGEE_WARN_ALTITUDE_M (120 km) is reported here rather than rejected — the state vector is persisted, but its propagations may be truncated at the 100 km in-flight floor.
Non-fatal validation warnings raised while importing this state vector. Empty when the import raised none. A perigee altitude below OrbitGeometryValidator.PERIGEE_WARN_ALTITUDE_M (120 km) is reported here rather than rejected — the state vector is persisted, but its propagations may be truncated at the 100 km in-flight floor.
[]
Was this page helpful?