Mariner GPS Tools डेवलपर प्लेटफ़ॉर्म
निर्देशांकों को पार्स और प्रारूपित करें
अक्षांश और देशांतर के प्रारूप बदलें
इंटरफ़ेस
POST
REST समापन बिंदु
/api/v1/coordinates/convertMCP
उपकरण का नाम
convert_coordinatesनिवेदन
अनुरोध को JSON के रूप में भेजें। MCP क्लाइंट टूल तर्कों के समान फ़ील्ड पास करते हैं।
cURLshell
curl -X POST https://marinergps.tools/api/v1/coordinates/convert \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"latitude": "51.5074",
"longitude": "-0.1278",
"format": "dms"
}'निकाय से अनुरोध करेंjson
{
"latitude": "51.5074",
"longitude": "-0.1278",
"format": "dms"
}प्रतिक्रिया
REST गणना परिणाम को मानक सफलता लिफाफे में लपेटता है। MCP संरचित टूल आउटपुट के समान गणना डेटा लौटाता है।
JSON
{
"ok": true,
"data": {
"latitude": {
"decimal": 51.5074,
"formatted": "51° 30′ 26.640″ N"
},
"longitude": {
"decimal": -0.1278,
"formatted": "0° 07′ 40.080″ W"
},
"format": "dms"
}
}{
"ok": false,
"error": {
"code": "invalid_request",
"message": "Invalid request input."
}
}स्कीमा
नीचे दी गई परिभाषाएँ इनपुट को मान्य करने और आउटपुट का वर्णन करने के लिए उपयोग की जाने वाली संपूर्ण JSON स्कीमा दिखाती हैं।
इनपुट स्कीमा
{
"type": "object",
"additionalProperties": false,
"properties": {
"latitude": {
"type": "string",
"description": "Latitude as decimal degrees or DMS text."
},
"longitude": {
"type": "string",
"description": "Longitude as decimal degrees or DMS text."
},
"format": {
"type": "string",
"enum": [
"decimal",
"dms"
],
"description": "Output coordinate format."
}
},
"required": [
"latitude",
"longitude",
"format"
]
}आउटपुट स्कीमा
{
"type": "object",
"additionalProperties": false,
"properties": {
"latitude": {
"type": "object",
"additionalProperties": false,
"properties": {
"decimal": {
"type": "number"
},
"formatted": {
"type": "string"
}
},
"required": [
"decimal",
"formatted"
]
},
"longitude": {
"type": "object",
"additionalProperties": false,
"properties": {
"decimal": {
"type": "number"
},
"formatted": {
"type": "string"
}
},
"required": [
"decimal",
"formatted"
]
},
"format": {
"type": "string",
"enum": [
"decimal",
"dms"
]
}
},
"required": [
"latitude",
"longitude",
"format"
]
}