Skip to main content

Getting Started

Prerequisites

  1. API User Account: You need an active API User (not a normal account) with appropriate permissions
  2. API Token: The 80-character Bearer token from the API User
  3. Workflow Access: API User must have permission to submit to the target workflow
  4. Form Structure: Understanding of the workflow's form fields and requirements

Important: API Users vs Normal Accounts

Account Type Requirements

⚠️ Critical: You CANNOT use a normal OSPROV account to submit data through the API. Here's why:

Normal OSPROV Account:

  • Uses web guard for browser-based access
  • Authenticates with username/password or SSO
  • No API token - cannot authenticate with API endpoints
  • Designed for human users accessing the web interface

API User Account:

  • Uses api guard (completely separate system)
  • Authenticates with 80-character Bearer token
  • Cannot log into web interface
  • Designed specifically for programmatic/system access

What This Means

If you're "John Doe" with a normal OSPROV account:

  • ❌ Cannot use your normal login credentials for API
  • ✅ Admin must create separate "API User" (e.g., "John's Integration Account")
  • ✅ You use that API User's token for programmatic submissions
  • ✅ Both accounts can exist simultaneously for different purposes

This separation by design maintains clear distinction between human users and system integrations.

Basic API Request

Endpoint Format:

POST /api/submissions/workflow/{workflow_id}

Required Headers:

Content-Type: application/json
Authorization: Bearer YOUR_API_TOKEN
Accept: application/json

Basic Request Example:

curl -X POST "https://your-domain.com/api/submissions/workflow/123" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-token-here" \
-H "Accept: application/json" \
-d '{
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890"
}'

Next Steps

  1. Set up API Users: Work with your administrator to create API user accounts
  2. Understand Authentication: Learn how to properly authenticate your requests
  3. Study Request Formats: Understand how to structure your JSON data
  4. Review Examples: Look at real-world integration scenarios
  5. Test Your Integration: Start with simple requests and build complexity