Developer Docs
Internal Data API
Upload internal company data to SuccessGuardian using multipart/form-data requests.
POSThttps://api.successguardian.in/api/internaldata/your-company-id
Description: This endpoint accepts a
POST request with multipart/form-data. The form data must include a field named data, which contains a JSON array representing the internal company data.⚠️ Required Headers
Content-Type: multipart/form-data
Accept: application/jsonoptional
💻 Request Body Format
[
{
"Company Name": "Company A",
"Attribute X": 10,
"Attribute Y": 242,
"Revenue": 1500000,
"Employees": 25
}
]Implementation Examples
import requests
import json
url = "https://api.successguardian.in/api/internaldata/your-company-id"
data = [
{
"Company Name": "Test Company A",
"Attribute X": 10,
"Attribute Y": 242,
"Revenue": 1500000,
"Employees": 25
}
]
files = {'data': (None, json.dumps(data), 'application/json')}
try:
response = requests.post(url, files=files)
response.raise_for_status()
if response.status_code == 200:
print('✅ Data uploaded successfully')
print('Response:', response.json())
else:
print('❌ Upload failed:', response.status_code)
except requests.exceptions.RequestException as e:
print('❌ Request failed:', str(e))✅ Success Response
✓ 200 OK
{
"status": "success",
"message": "Data uploaded successfully"
}❌ Error Response
⚠ 400 Bad Request
{
"status": "error",
"message": "Invalid JSON format in data field",
"error_code": "INVALID_JSON"
}