Skip to main content

SoshiaConnect API (1.0.0)

Download OpenAPI specification:Download

SoshiaConnect API Support: support@soshiaconnect.com License: Proprietary

Complete API documentation for SoshiaConnect platform with standardized naming conventions and comprehensive endpoint coverage.

Authentication

The API uses two authentication methods:

  • Bearer Token: For authenticated user endpoints (obtained via login)
  • API Key: For external API consumption (X-API-Key header)

Base URL

All endpoints are relative to: https://your-api-domain.com/api

Authentication & User Management

User registration, login, profile management, and session handling

Register User

Creates a new user account in the system with email verification required

Request Body schema: multipart/form-data
required
full_name
required
string

User's full name for registration

organization
required
string

Organization name the user belongs to

number_of_users
required
integer

Expected number of users in the organization

email
required
string <email>

User's email address for registration

password
required
string <password> >= 8 characters

User's password for registration

password_confirmation
required
string <password>

Password confirmation - must match password field

user_type_code
required
string

Type of user account (partner, admin, etc.)

referred_by_partner_id
integer

Partner ID if referred by existing partner (optional)

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

User Login

Authenticates user and returns access token for subsequent API calls

Request Body schema: multipart/form-data
required
email
required
string <email>

User's registered email address

password
required
string <password>

User's account password

Responses

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "token_type": "Bearer",
  • "user": {
    }
}

User Logout

Invalidates the current user session and access token

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

Get User Profile

Retrieves the authenticated user's profile information

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "full_name": "John Doe",
  • "email": "john.doe@acme.com",
  • "organization": "Acme Corp",
  • "number_of_users": 50,
  • "mobile_number": "+1234567890",
  • "user_type_code": "partner",
  • "status": "active",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Update User Profile

Updates the authenticated user's profile information

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
full_name
string

Updated full name

organization
string

Updated organization name

number_of_users
integer

Updated number of users in organization

email
string <email>

Updated email address

mobile_number
string

Updated mobile phone number

status
string
Enum: "active" "inactive"

Account status

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

Update User Password

Changes the authenticated user's password with current password verification

Authorizations:
BearerAuth
Request Body schema: application/json
required
current_password
required
string <password>

Current password for verification

new_password
required
string <password> >= 8 characters

New password to set

new_password_confirmation
required
string <password>

Confirmation of new password

Responses

Request samples

Content type
application/json
{
  • "current_password": "pa$$word",
  • "new_password": "pa$$word",
  • "new_password_confirmation": "pa$$word"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

Get User Types

Retrieves available user types for registration (partner, admin, etc.)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get SaaS Plans

Retrieves available SaaS subscription plans and pricing information

header Parameters
X-API-Key
required
string

API key for authentication

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Refresh Access Token

Refreshes the current access token to extend session validity

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "token_type": "Bearer"
}

Delete User By Email

Administrative endpoint to delete a user account by email address

Request Body schema: multipart/form-data
required
email
required
string <email>

Email address of user to delete

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

OTP & Password Recovery

Email verification, OTP handling, and password reset functionality

Verify OTP Code

Verifies the OTP code sent to user's email for account verification or password reset

Request Body schema: multipart/form-data
required
email
required
string <email>

Email address associated with OTP

otp
required
string^\d{6}$

6-digit OTP code received via email

type
required
string
Enum: "registration" "password_reset"

Type of OTP

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

Resend OTP Code

Resends OTP code to the specified email address

Request Body schema: multipart/form-data
required
email
required
string <email>

Email address to resend OTP to

type
required
string
Enum: "registration" "password_reset"

Type of OTP to resend

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

Forgot Password Request

Initiates password recovery process by sending OTP to registered email

Request Body schema: multipart/form-data
required
email
required
string <email>

Email address for password recovery

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

Reset Password With OTP

Resets user password using verified OTP code

Request Body schema: multipart/form-data
required
email
required
string <email>

Email address for password reset

otp
required
string^\d{6}$

OTP code received via email

password
required
string <password> >= 8 characters

New password to set

password_confirmation
required
string <password>

Confirmation of new password

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

API Key Management

API key lifecycle management including CRUD operations

List All API Keys

Retrieves all API keys associated with the authenticated user's account

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create New API Key

Generates a new API key with specified name and associated username

Authorizations:
BearerAuth
Request Body schema: application/json
required
api_key_name
required
string

Name for the API key

user
required
string

Username to associate with the API key

Responses

Request samples

Content type
application/json
{
  • "api_key_name": "Production API Key",
  • "user": "api_user_1"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "api_key_name": "Production API Key",
  • "api_key": "sk_live_xxxxxxxxxxxxx",
  • "user": "api_user_1",
  • "status": "active",
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_used_at": "2019-08-24T14:15:22Z"
}

Get API Key Details

Retrieves detailed information about a specific API key by its ID

Authorizations:
BearerAuth
path Parameters
api_key_id
required
integer

API key ID

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "api_key_name": "Production API Key",
  • "api_key": "sk_live_xxxxxxxxxxxxx",
  • "user": "api_user_1",
  • "status": "active",
  • "created_at": "2019-08-24T14:15:22Z",
  • "last_used_at": "2019-08-24T14:15:22Z"
}

Delete API Key

Permanently deletes an API key - this action cannot be undone

Authorizations:
BearerAuth
path Parameters
api_key_id
required
integer

API key ID

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

Update API Key Status

Updates the status of an API key (active/inactive) to enable or disable access

Authorizations:
BearerAuth
path Parameters
api_key_id
required
integer

API key ID

Request Body schema: application/json
required
status
required
string
Enum: "active" "inactive"

New status for the API key

Responses

Request samples

Content type
application/json
{
  • "status": "active"
}

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

Export API Keys

Exports API key data in CSV format for backup or reporting purposes

Authorizations:
BearerAuth

Responses

Route Management

Shipping routes management and access control

List All Available Routes

Retrieves complete list of all available shipping routes in the system

Authorizations:
BearerAuth
header Parameters
X-API-Key
required
string

API key for authentication

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Route Data By ID

Retrieves detailed information about a specific shipping route

Authorizations:
BearerAuth
query Parameters
id
required
integer

Specific route ID to retrieve data for

header Parameters
X-API-Key
required
string

API key for authentication

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "US East Coast Route",
  • "code": "US-EC-001",
  • "description": "string",
  • "status": "active",
  • "periods": [
    ],
  • "pricing": { }
}

Check Single Route Access

Verifies if a specific user has access to a particular shipping route

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
user_id
required
integer

ID of user to check access for

route_id
required
integer

ID of route to check access to

Responses

Response samples

Content type
application/json
{
  • "has_access": true,
  • "message": "string"
}

Get Limited Route Access

Retrieves hierarchical structure of shipping routes with access limitations

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{ }

Get Shipping Period Data

Retrieves shipping schedule and period information for a specific period

Authorizations:
BearerAuth
path Parameters
period_id
required
integer

Shipping period ID

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "period_name": "Q1 2024",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "status": "active"
}

Subscription & Payment Management

Subscription lifecycle, payment processing, and billing

Calculate Subscription Price

Calculates total subscription cost for multiple routes and periods

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
period_id[0]
integer

Period ID for first route/report

report_id[0]
integer

Report ID for first route/report

subscription_term[0]
string
Enum: "1_month" "2_months" "3_months" "6_months" "12_months"

Subscription duration

Responses

Response samples

Content type
application/json
{
  • "calculation_id": 0,
  • "total_amount": 299.97,
  • "currency": "USD",
  • "items": [
    ]
}

Calculate Single Route Price

Calculates subscription cost for a single route and period

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
period_id
required
integer

Period ID for pricing calculation

subscription_term
required
string
Enum: "1_month" "2_months" "3_months" "6_months" "12_months"

Subscription term duration

Responses

Response samples

Content type
application/json
{
  • "calculation_id": 0,
  • "total_amount": 299.97,
  • "currency": "USD",
  • "items": [
    ]
}

Create Payment Intent

Creates Stripe payment intent for processing subscription payment

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
total_amount
required
number <float>

Total amount to charge in dollars

currency
required
string
Enum: "USD" "EUR" "GBP"

Currency code

calculation_id
required
integer

ID from previous price calculation

Responses

Response samples

Content type
application/json
{
  • "client_secret": "string",
  • "payment_intent_id": "string"
}

Confirm Payment Success

Confirms successful payment and activates subscription services

Authorizations:
BearerAuth
Request Body schema: multipart/form-data
required
payment_intent_id
required
string

Stripe payment intent ID from successful payment

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

Get My Active Routes

Retrieves all active route subscriptions for the authenticated user

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get My Billing History

Retrieves complete billing and payment history for the user account

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Subscription Months

Retrieves available subscription duration options (dropdown data)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Process Checkout

Processes subscription checkout with selected pricing and duration

Request Body schema: multipart/form-data
required
pricing_slabs_id
required
integer

ID of selected pricing tier

subscription
required
string

Subscription type

amount
required
number <float>

Total checkout amount

report_id
required
integer

Report ID for checkout

subscription_term
required
string

Duration of subscription term

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

Partner Management

Partner program features and commission management

Setup Partner Payout

Initializes payout configuration for partner account commission payments

Authorizations:
BearerAuth
header Parameters
X-API-Key
required
string

API key for authentication

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "message": "Operation completed successfully",
  • "data": { }
}

Get Partner Account Status

Retrieves current partner account status and verification information

Authorizations:
BearerAuth
header Parameters
X-API-Key
required
string

API key for authentication

Responses

Response samples

Content type
application/json
{
  • "account_id": "string",
  • "status": "active",
  • "verification_status": "string",
  • "can_receive_payouts": true,
  • "total_earnings": 0.1,
  • "pending_payouts": 0.1
}

Get Partner Payout Info

Retrieves partner payout configuration and earning details

Authorizations:
BearerAuth
header Parameters
X-API-Key
required
string

API key for authentication

Responses

Response samples

Content type
application/json
{
  • "total_earnings": 0.1,
  • "paid_out": 0.1,
  • "pending": 0.1,
  • "next_payout_date": "2019-08-24",
  • "payout_method": "string"
}

Analytics & Reporting

Usage statistics, reporting, and analytics

Get My Account Statistics

Retrieves comprehensive account statistics including usage and subscription data

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "total_subscriptions": 0,
  • "active_subscriptions": 0,
  • "total_api_calls": 0,
  • "api_calls_this_month": 0,
  • "total_spent": 0.1,
  • "active_api_keys": 0
}

Get All API Usage Logs

Retrieves complete API usage history and call logs for the account

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Single Report API Usage

Retrieves API usage logs for a specific report ID

path Parameters
report_id
required
integer

Report ID

header Parameters
X-API-Key
required
string

API key for authentication

X-Username
required
string

Username associated with API key

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Report Overview Analytics

Retrieves report usage overview and analytics for specified time period

Authorizations:
BearerAuth
query Parameters
period
required
string
Enum: "days" "weeks" "months" "years"

Time period for analytics

Responses

Response samples

Content type
application/json
{
  • "period": "string",
  • "total_reports": 0,
  • "reports_accessed": 0,
  • "most_accessed_routes": [
    ],
  • "usage_trend": [
    ]
}

Get Upcoming Subscription Expirations

Retrieves list of subscriptions that will expire soon for renewal planning

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Latest Accessed Reports

Retrieves recently accessed reports for quick navigation and usage tracking

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
[
  • { }
]

Get API Call Usage Statistics

Retrieves detailed API call usage statistics for specified time period

Authorizations:
BearerAuth
query Parameters
period
required
string
Enum: "days" "weeks" "months" "years"

Time period for usage statistics

Responses

Response samples

Content type
application/json
{
  • "period": "string",
  • "total_calls": 0,
  • "successful_calls": 0,
  • "failed_calls": 0,
  • "average_response_time": 0.1,
  • "peak_usage_time": "14:15:22Z",
  • "calls_by_endpoint": [
    ]
}

External API Consumption

Endpoints for external system integration

Get API Route Data

External API endpoint for retrieving route data using API key authentication

query Parameters
id
required
integer

Route ID to retrieve data for

header Parameters
X-API-Key
required
string

API key for authentication

X-Username
required
string

Username associated with API key

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "US East Coast Route",
  • "code": "US-EC-001",
  • "description": "string",
  • "status": "active",
  • "periods": [
    ],
  • "pricing": { }
}

System Utilities

System utilities and webhooks

Handle Stripe Webhook

Webhook endpoint for processing Stripe payment notifications and events

header Parameters
Stripe-Signature
required
string

Stripe webhook signature for verification

Request Body schema: application/json
required
object

Stripe webhook event payload

Responses

Request samples

Content type
application/json
{ }