MENU navbar-image

Introduction

Ruhline API — authentication and role-based access for customers, admins, staff, and coaches, plus public catalogs, checkout, enrollments, reviews, disputes, and payouts.

Welcome to the Ruhline API documentation. This API provides authentication and role-based access for customers, admins, and coaches, along with public guest endpoints.

- **Customer**: Auth under `/api/v1/auth/customer/*`; after purchase, enrollments and session scheduling under `/api/v1/customer/*` (Sanctum + `role:customer`).
- **Admin**: Staff auth under `/api/v1/auth/admin/*`; dashboard summary at `/api/v1/admin/dashboard`; CRUD and CMS under `/api/v1/admin/{module}` (Sanctum + `role:admin`). Auth-only profile routes also live under `/api/v1/admin/*` from the Auth module.
- **Coach**: Auth under `/api/v1/auth/coach/*`; coach portal APIs under `/api/v1/coach/{module}` (Sanctum + `role:coach`).
- **Guest (no auth)**: Program catalog at `/api/v1/programs/*`, coach directory at `/api/v1/coaches/*`, plus other public v1 module routes mounted as documented per group.

**Checkout** (customer) uses `/api/v1/checkout/*`. Admin order management uses `/api/v1/admin/orders/*`. **Disputes** exist for customers (`/api/v1/dispute/*`), coaches (`/api/v1/coach/dispute/*`), and admins (`/api/v1/admin/dispute/*`). **Payouts**: coach listing at `/api/v1/payout/*`, admin management at `/api/v1/admin/payout/*`.

## Authentication

The API uses Laravel Sanctum for token-based authentication. After successful login, include the access token in the `Authorization` header for protected routes:

```
Authorization: Bearer {your-token-here}
```

## Base URL

API routes are served under the `api` prefix (typically `/api/...`). Versioned modules use `/api/v1/...` unless noted otherwise.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by logging in through the authentication endpoints. Include the token in the Authorization header as: Bearer {your-token-here}

Customer Authentication

APIs for customer authentication, registration, and password management.

Register a new customer

Register a new customer account. After registration, a verification email will be sent to the provided email address. The customer must verify their email before they can log in.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/customer/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"email\": \"john.doe@example.com\",
    \"password\": \"password123\",
    \"terms_accepted\": true,
    \"password_confirmation\": \"password123\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/customer/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com",
    "password": "password123",
    "terms_accepted": true,
    "password_confirmation": "password123"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "success": true,
    "message": "Customer registered successfully. Please check your email to verify your account.",
    "data": {
        "user": {
            "id": 1,
            "name": "John Doe",
            "first_name": "John",
            "last_name": "Doe",
            "email": "john.doe@example.com",
            "email_verified_at": null,
            "roles": [
                "customer"
            ]
        },
        "message": "Registration successful. Please verify your email address before logging in."
    }
}
 

Example response (422):


{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "email": [
            "This email address is already registered."
        ]
    }
}
 

Request      

POST api/v1/auth/customer/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

first_name   string     

The customer's first name. Example: John

last_name   string     

The customer's last name. Example: Doe

email   string     

The customer's email address. Must be unique. Example: john.doe@example.com

password   string     

The customer's password. Must be at least 8 characters. Example: password123

terms_accepted   boolean     

Must be true to accept terms and conditions. Example: true

password_confirmation   string     

Password confirmation. Must match password. Example: password123

Login customer

Authenticate a customer and return an access token. The customer must have verified their email address before logging in.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/customer/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"john.doe@example.com\",
    \"password\": \"password123\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/customer/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "john.doe@example.com",
    "password": "password123"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Login successful",
    "data": {
        "user": {
            "id": 1,
            "name": "John Doe",
            "first_name": "John",
            "last_name": "Doe",
            "email": "john.doe@example.com",
            "email_verified_at": "2025-01-20T17:25:00+00:00",
            "roles": [
                "customer"
            ],
            "profile": {
                "phone": "1234567890",
                "phone_country_code": {
                    "id": 1,
                    "phone_code": "+1",
                    "intl_dialing_prefix": "1"
                },
                "address_line_1": "123 Main Street",
                "address_line_2": "Apt 4B",
                "landmark": "Near Central Park",
                "country": {
                    "id": 1,
                    "name": "United States"
                },
                "state": {
                    "id": 1,
                    "name": "New York"
                },
                "city": {
                    "id": 1,
                    "name": "New York City"
                },
                "postal_code": "12345",
                "profile_image": "http://example.com/storage/customer-profiles/image.jpg"
            }
        },
        "token": "1|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    }
}
 

Example response (422):


{
    "success": false,
    "message": "Please verify your email address before logging in. Check your inbox for the verification link.",
    "errors": {
        "email": [
            "Please verify your email address before logging in. Check your inbox for the verification link."
        ]
    }
}
 

Request      

POST api/v1/auth/customer/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The customer's email address. Example: john.doe@example.com

password   string     

The customer's password. Example: password123

Forgot password

Send a password reset link to the customer's email address. The link will be sent to the frontend URL configured in the system.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/customer/forgot-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"john.doe@example.com\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/customer/forgot-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "john.doe@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "If a customer account exists with that email, we have sent a password reset link.",
    "data": {
        "message": "If a customer account exists with that email, we have sent a password reset link.",
        "frontend_url": "http://localhost:3000"
    }
}
 

Request      

POST api/v1/auth/customer/forgot-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The customer's email address. Example: john.doe@example.com

Reset password

Reset the customer's password using the token received in the password reset email.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/customer/reset-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"abc123...\",
    \"email\": \"john.doe@example.com\",
    \"password\": \"newpassword123\",
    \"password_confirmation\": \"newpassword123\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/customer/reset-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "abc123...",
    "email": "john.doe@example.com",
    "password": "newpassword123",
    "password_confirmation": "newpassword123"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Password has been reset successfully. You can now login with your new password.",
    "data": {
        "message": "Password has been reset successfully. You can now login with your new password."
    }
}
 

Example response (400):


{
    "success": false,
    "message": "Invalid or expired reset token."
}
 

Request      

POST api/v1/auth/customer/reset-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

token   string     

The password reset token from the email. Example: abc123...

email   string     

The customer's email address. Example: john.doe@example.com

password   string     

The new password. Must be at least 8 characters. Example: newpassword123

password_confirmation   string     

Password confirmation. Must match password. Example: newpassword123

Verify email address (POST)

Verify a customer's email address using the verification parameters from the email link. This endpoint is designed for frontend applications to call after extracting parameters from the verification URL.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/customer/email/verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 1,
    \"hash\": \"abc123...\",
    \"expires\": 1234567890,
    \"signature\": \"xyz789...\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/customer/email/verify"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 1,
    "hash": "abc123...",
    "expires": 1234567890,
    "signature": "xyz789..."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Email verified successfully. You can now log in.",
    "data": {
        "user": {
            "id": 1,
            "name": "John Doe",
            "email": "john.doe@example.com",
            "email_verified_at": "2025-01-20T17:25:00+00:00",
            "roles": [
                "customer"
            ]
        },
        "already_verified": false
    }
}
 

Example response (403):


{
    "success": false,
    "message": "Invalid or expired verification link."
}
 

Request      

POST api/v1/auth/customer/email/verify

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

id   integer     

The user ID from the verification link. Example: 1

hash   string     

The verification hash from the email link. Example: abc123...

expires   integer     

The expiration timestamp from the verification link. Example: 1234567890

signature   string     

The signature from the verification link. Example: xyz789...

Verify email address (GET)

Verify a customer's email address via direct link access. This endpoint is used when clicking the verification link directly.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/auth/customer/email/verify/1/abc123..." \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/customer/email/verify/1/abc123..."
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Email verified successfully. You can now log in.",
    "data": {
        "user": {
            "id": 1,
            "name": "John Doe",
            "email": "john.doe@example.com",
            "email_verified_at": "2025-01-20T17:25:00+00:00",
            "roles": [
                "customer"
            ]
        },
        "already_verified": false
    }
}
 

Request      

GET api/v1/auth/customer/email/verify/{id}/{hash}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The user ID. Example: 1

hash   string     

The verification hash. Example: abc123...

Resend email verification

Resend the email verification link to the customer's email address. This is a public endpoint that accepts an email address.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/customer/email/resend-verification" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"john.doe@example.com\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/customer/email/resend-verification"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "john.doe@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "If a customer account exists with that email, we have sent a verification email.",
    "data": {
        "message": "If a customer account exists with that email, we have sent a verification email.",
        "frontend_url": "http://localhost:3000"
    }
}
 

Example response (400):


{
    "success": false,
    "message": "Email already verified."
}
 

Example response (422):


{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "email": [
            "We could not find a user with that email address."
        ]
    }
}
 

Request      

POST api/v1/auth/customer/email/resend-verification

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The customer's email address. Example: john.doe@example.com

Logout customer

requires authentication

Revoke the current access token and log out the authenticated customer.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/customer/logout" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/customer/logout"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Logged out successfully",
    "data": []
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

POST api/v1/auth/customer/logout

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get customer profile

requires authentication

Get the authenticated customer's profile information.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/auth/customer/me" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/customer/me"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Profile retrieved successfully",
    "data": {
        "user": {
            "id": 1,
            "name": "John Doe",
            "first_name": "John",
            "last_name": "Doe",
            "email": "john.doe@example.com",
            "email_verified_at": "2025-01-20T17:25:00+00:00",
            "roles": [
                "customer"
            ],
            "profile": {
                "phone": "1234567890",
                "phone_country_code": {
                    "id": 1,
                    "phone_code": "+1"
                },
                "address_line_1": "123 Main Street",
                "address_line_2": "Apt 4B",
                "landmark": "Near Central Park",
                "country": {
                    "id": 1,
                    "name": "United States"
                },
                "state": {
                    "id": 1,
                    "name": "New York"
                },
                "city": {
                    "id": 1,
                    "name": "New York City"
                },
                "postal_code": "12345",
                "profile_image": "http://example.com/storage/profiles/image.jpg"
            }
        }
    }
}
 

Request      

GET api/v1/auth/customer/me

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Change password

requires authentication

Change the authenticated customer's password. The customer must provide their current password for verification.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/customer/change-password" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"current_password\": \"oldpassword123\",
    \"password\": \"newpassword123\",
    \"password_confirmation\": \"newpassword123\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/customer/change-password"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "current_password": "oldpassword123",
    "password": "newpassword123",
    "password_confirmation": "newpassword123"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Password changed successfully",
    "data": {
        "message": "Your password has been changed successfully."
    }
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Example response (422):


{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "current_password": [
            "The current password is incorrect."
        ]
    }
}
 

Request      

POST api/v1/auth/customer/change-password

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

current_password   string     

The customer's current password. Example: oldpassword123

password   string     

The new password. Must be at least 8 characters. Example: newpassword123

password_confirmation   string     

Password confirmation. Must match password. Example: newpassword123

Update customer profile

requires authentication

Update the authenticated customer's profile information including personal details, contact information, address, and profile image.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/customer/update-profile" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "first_name=John"\
    --form "last_name=Doe"\
    --form "email=john.doe@example.com"\
    --form "phone=1234567890"\
    --form "phone_country_code_id=1"\
    --form "address_line_1=123 Main Street"\
    --form "address_line_2=Apt 4B"\
    --form "landmark=Near Central Park"\
    --form "country_id=1"\
    --form "state_id=1"\
    --form "city_id=1"\
    --form "postal_code=12345"\
    --form "profile_image=@C:\Users\AMITB\AppData\Local\Temp\php38E5.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/customer/update-profile"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('first_name', 'John');
body.append('last_name', 'Doe');
body.append('email', 'john.doe@example.com');
body.append('phone', '1234567890');
body.append('phone_country_code_id', '1');
body.append('address_line_1', '123 Main Street');
body.append('address_line_2', 'Apt 4B');
body.append('landmark', 'Near Central Park');
body.append('country_id', '1');
body.append('state_id', '1');
body.append('city_id', '1');
body.append('postal_code', '12345');
body.append('profile_image', document.querySelector('input[name="profile_image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Profile updated successfully",
    "data": {
        "user": {
            "id": 1,
            "name": "John Doe",
            "first_name": "John",
            "last_name": "Doe",
            "email": "john.doe@example.com",
            "email_verified_at": "2025-01-20T17:25:00+00:00",
            "roles": [
                "customer"
            ],
            "profile": {
                "phone": "1234567890",
                "phone_country_code": {
                    "id": 1,
                    "phone_code": "+1"
                },
                "address_line_1": "123 Main Street",
                "address_line_2": "Apt 4B",
                "landmark": "Near Central Park",
                "country": {
                    "id": 1,
                    "name": "United States"
                },
                "state": {
                    "id": 1,
                    "name": "New York"
                },
                "city": {
                    "id": 1,
                    "name": "New York City"
                },
                "postal_code": "12345",
                "profile_image": "http://example.com/storage/profiles/image.jpg"
            }
        }
    }
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Example response (422):


{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "email": [
            "This email address is already registered."
        ]
    }
}
 

Request      

POST api/v1/auth/customer/update-profile

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

first_name   string  optional    

The customer's first name. Example: John

last_name   string  optional    

The customer's last name. Example: Doe

email   string  optional    

The customer's email address. Must be unique. Example: john.doe@example.com

phone   string  optional    

The customer's phone number. Example: 1234567890

phone_country_code_id   integer  optional    

The ID of the phone country code. Example: 1

address_line_1   string  optional    

The customer's primary address line. Example: 123 Main Street

address_line_2   string  optional    

The customer's secondary address line. Example: Apt 4B

landmark   string  optional    

A nearby landmark. Example: Near Central Park

country_id   integer  optional    

The ID of the country. Example: 1

state_id   integer  optional    

The ID of the state. Example: 1

city_id   integer  optional    

The ID of the city. Example: 1

postal_code   string  optional    

The postal or zip code. Example: 12345

profile_image   file  optional    

The customer's profile image. Must be an image file (jpeg, png, jpg, gif) and not exceed 2MB. Example: C:\Users\AMITB\AppData\Local\Temp\php38E5.tmp

Admin Authentication

APIs for admin and staff authentication. Both admin and staff users can access the admin portal.

Get admin/staff profile data

requires authentication

Get the authenticated admin or staff user's detailed profile data including first name, last name, email, profile photo and extra data.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/profile" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/profile"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Admin profile retrieved successfully",
    "data": {
        "id": 1,
        "user_id": 1,
        "first_name": "John",
        "last_name": "Doe",
        "email": "admin@ruhline.com",
        "profile_photo": "http://example.com/storage/profiles/photo.jpg",
        "extra_data": null,
        "created_at": "2026-01-20T17:47:05+00:00",
        "updated_at": "2026-01-20T17:47:05+00:00"
    }
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Example response (404):


{
    "success": false,
    "message": "Admin profile not found"
}
 

Request      

GET api/v1/admin/profile

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Update profile

requires authentication

Update the authenticated admin or staff user's profile information including first name, last name, and profile photo.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/profile" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "first_name=John"\
    --form "last_name=Doe"\
    --form "profile_photo=@C:\Users\AMITB\AppData\Local\Temp\php38B5.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/profile"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('first_name', 'John');
body.append('last_name', 'Doe');
body.append('profile_photo', document.querySelector('input[name="profile_photo"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Profile updated successfully",
    "data": {
        "user": {
            "id": 1,
            "name": "John Doe",
            "first_name": "John",
            "last_name": "Doe",
            "email": "admin@ruhline.com",
            "email_verified_at": null,
            "roles": [
                "admin"
            ],
            "profile": {
                "profile_photo": "http://example.com/storage/profiles/photo.jpg"
            }
        }
    }
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Example response (422):


{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "profile_photo": [
            "The profile photo must be an image."
        ]
    }
}
 

Request      

PUT api/v1/admin/profile

PATCH api/v1/admin/profile

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

first_name   string  optional    

The admin/staff first name. Example: John

last_name   string  optional    

The admin/staff last name. Example: Doe

profile_photo   file  optional    

The admin/staff profile photo. Must be an image file (jpeg, png, jpg, gif) and not exceed 2MB. Example: C:\Users\AMITB\AppData\Local\Temp\php38B5.tmp

Login admin or staff

Authenticate an admin or staff user and return an access token. Both admin and staff roles can use this endpoint.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/admin/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"admin@ruhline.com\",
    \"password\": \"password\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/admin/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "admin@ruhline.com",
    "password": "password"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Login successful",
    "data": {
        "user": {
            "id": 1,
            "name": "Admin User",
            "first_name": "Admin",
            "last_name": "User",
            "email": "admin@ruhline.com",
            "email_verified_at": null,
            "roles": [
                "admin"
            ],
            "profile": {
                "profile_photo": "http://example.com/storage/profiles/photo.jpg"
            }
        },
        "token": "1|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    }
}
 

Example response (422):


{
    "success": false,
    "message": "This account is not authorized to access the admin portal.",
    "errors": {
        "email": [
            "This account is not authorized to access the admin portal."
        ]
    }
}
 

Request      

POST api/v1/auth/admin/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The admin/staff email address. Example: admin@ruhline.com

password   string     

The admin/staff password. Example: password

Logout admin/staff

requires authentication

Revoke the current access token and log out the authenticated admin or staff user.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/admin/logout" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/admin/logout"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Logged out successfully",
    "data": []
}
 

Request      

POST api/v1/auth/admin/logout

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get admin/staff profile

requires authentication

Get the authenticated admin or staff user's profile information.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/auth/admin/me" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/admin/me"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Profile retrieved successfully",
    "data": {
        "user": {
            "id": 1,
            "name": "Admin User",
            "email": "admin@ruhline.com",
            "email_verified_at": null,
            "roles": [
                "admin"
            ]
        }
    }
}
 

Request      

GET api/v1/auth/admin/me

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Change password

requires authentication

Change the authenticated admin or staff user's password. The user must provide their current password for verification.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/admin/change-password" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"current_password\": \"oldpassword123\",
    \"password\": \"newpassword123\",
    \"password_confirmation\": \"newpassword123\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/admin/change-password"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "current_password": "oldpassword123",
    "password": "newpassword123",
    "password_confirmation": "newpassword123"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Password changed successfully",
    "data": {
        "message": "Your password has been changed successfully."
    }
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Example response (422):


{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "current_password": [
            "The current password is incorrect."
        ]
    }
}
 

Request      

POST api/v1/auth/admin/change-password

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

current_password   string     

The admin/staff current password. Example: oldpassword123

password   string     

The new password. Must be at least 8 characters. Example: newpassword123

password_confirmation   string     

Password confirmation. Must match password. Example: newpassword123

Get admin/staff profile data

requires authentication

Get the authenticated admin or staff user's detailed profile data including first name, last name, email, profile photo and extra data.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/auth/admin/profile" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/admin/profile"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Admin profile retrieved successfully",
    "data": {
        "id": 1,
        "user_id": 1,
        "first_name": "John",
        "last_name": "Doe",
        "email": "admin@ruhline.com",
        "profile_photo": "http://example.com/storage/profiles/photo.jpg",
        "extra_data": null,
        "created_at": "2026-01-20T17:47:05+00:00",
        "updated_at": "2026-01-20T17:47:05+00:00"
    }
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Example response (404):


{
    "success": false,
    "message": "Admin profile not found"
}
 

Request      

GET api/v1/auth/admin/profile

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Update profile

requires authentication

Update the authenticated admin or staff user's profile information including first name, last name, and profile photo.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/auth/admin/profile" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "first_name=John"\
    --form "last_name=Doe"\
    --form "profile_photo=@C:\Users\AMITB\AppData\Local\Temp\php38E6.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/admin/profile"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('first_name', 'John');
body.append('last_name', 'Doe');
body.append('profile_photo', document.querySelector('input[name="profile_photo"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Profile updated successfully",
    "data": {
        "user": {
            "id": 1,
            "name": "John Doe",
            "first_name": "John",
            "last_name": "Doe",
            "email": "admin@ruhline.com",
            "email_verified_at": null,
            "roles": [
                "admin"
            ],
            "profile": {
                "profile_photo": "http://example.com/storage/profiles/photo.jpg"
            }
        }
    }
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Example response (422):


{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "profile_photo": [
            "The profile photo must be an image."
        ]
    }
}
 

Request      

PUT api/v1/auth/admin/profile

PATCH api/v1/auth/admin/profile

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

first_name   string  optional    

The admin/staff first name. Example: John

last_name   string  optional    

The admin/staff last name. Example: Doe

profile_photo   file  optional    

The admin/staff profile photo. Must be an image file (jpeg, png, jpg, gif) and not exceed 2MB. Example: C:\Users\AMITB\AppData\Local\Temp\php38E6.tmp

Admin - Dashboard

APIs for the admin portal dashboard summary. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/dashboard

Get dashboard summary

requires authentication

Returns aggregate counts (coaches, customers, programs) and the most recent checkout orders.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/dashboard?recent_orders_limit=10" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"recent_orders_limit\": 1
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/dashboard"
);

const params = {
    "recent_orders_limit": "10",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "recent_orders_limit": 1
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Dashboard data retrieved successfully",
    "data": {
        "stats": {
            "total_coaches": 5,
            "total_customers": 120,
            "total_programs": 15
        },
        "recent_orders": []
    }
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Example response (403):


{
    "success": false,
    "message": "Forbidden"
}
 

Example response (422):


{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "recent_orders_limit": [
            "The recent orders limit field must be between 1 and 50."
        ]
    }
}
 

Request      

GET api/v1/admin/dashboard

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

recent_orders_limit   integer  optional    

optional Number of recent orders to return. Default 10, min 1, max 50. Example: 10

Body Parameters

recent_orders_limit   integer  optional    

Must be at least 1. Must not be greater than 50. Example: 1

Coach Authentication

APIs for coach authentication. Coaches can register, verify email, and log in. Admin must verify a coach before they can log in (coaches created by admin are verified by default).

Register a new coach

Register a new coach account. After registration, a verification email is sent. The coach must verify their email, and an admin must verify the coach, before they can log in.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/coach/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"email\": \"coach@example.com\",
    \"password\": \"password123\",
    \"password_confirmation\": \"password123\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/coach/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "John",
    "last_name": "Doe",
    "email": "coach@example.com",
    "password": "password123",
    "password_confirmation": "password123"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "success": true,
    "message": "Coach registered successfully. Please check your email to verify your account.",
    "data": {
        "user": {
            "id": 1,
            "name": "John Doe",
            "email": "coach@example.com",
            "email_verified_at": null,
            "roles": [
                "coach"
            ]
        },
        "message": "Registration successful. Please verify your email. An admin must approve your account before you can log in."
    }
}
 

Request      

POST api/v1/auth/coach/register

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

first_name   string     

The coach's first name. Example: John

last_name   string     

The coach's last name. Example: Doe

email   string     

The coach's email address. Must be unique. Example: coach@example.com

password   string     

The coach's password. Must be at least 8 characters. Example: password123

password_confirmation   string     

Password confirmation. Example: password123

Login coach

Authenticate a coach and return an access token. The coach must have verified their email and be verified by an admin before they can log in.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/coach/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"coach@ruhline.com\",
    \"password\": \"password\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/coach/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "coach@ruhline.com",
    "password": "password"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Login successful",
    "data": {
        "user": {
            "id": 1,
            "name": "Coach User",
            "email": "coach@ruhline.com",
            "roles": [
                "coach"
            ]
        },
        "token": "1|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    }
}
 

Example response (422):


{
    "success": false,
    "message": "This account is not authorized to access the coach portal.",
    "errors": {
        "email": [
            "This account is not authorized to access the coach portal."
        ]
    }
}
 

Request      

POST api/v1/auth/coach/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The coach email address. Example: coach@ruhline.com

password   string     

The coach password. Example: password

Forgot password (coach)

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/coach/forgot-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"john.doe@example.com\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/coach/forgot-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "john.doe@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/coach/forgot-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The customer's email address. Must be a valid email address. The email of an existing record in the users table. Example: john.doe@example.com

Reset password (coach)

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/coach/reset-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"abc123...\",
    \"email\": \"john.doe@example.com\",
    \"password\": \"newpassword123\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/coach/reset-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "abc123...",
    "email": "john.doe@example.com",
    "password": "newpassword123"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/coach/reset-password

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

token   string     

The password reset token from the email. Example: abc123...

email   string     

The customer's email address. Must be a valid email address. The email of an existing record in the users table. Example: john.doe@example.com

password   string     

The new password. Must be at least 8 characters. Example: newpassword123

Verify coach email (POST)

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/coach/email/verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": 1,
    \"hash\": \"abc123...\",
    \"expires\": 1234567890,
    \"signature\": \"xyz789...\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/coach/email/verify"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": 1,
    "hash": "abc123...",
    "expires": 1234567890,
    "signature": "xyz789..."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/coach/email/verify

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

id   integer     

The user ID from the verification link. The id of an existing record in the users table. Example: 1

hash   string     

The verification hash from the email link. Example: abc123...

expires   integer     

The expiration timestamp from the verification link. Example: 1234567890

signature   string     

The signature from the verification link. Example: xyz789...

Verify coach email (GET)

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/auth/coach/email/verify/architecto/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/coach/email/verify/architecto/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (403):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Invalid signature."
}
 

Request      

GET api/v1/auth/coach/email/verify/{id}/{hash}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the verify. Example: architecto

hash   string     

Example: architecto

Resend coach email verification

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/coach/email/resend-verification" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"john.doe@example.com\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/coach/email/resend-verification"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "john.doe@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/auth/coach/email/resend-verification

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

The customer's email address. Must be a valid email address. The email of an existing record in the users table. Example: john.doe@example.com

Logout coach

requires authentication

Revoke the current access token and log out the authenticated coach user.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/coach/logout" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/coach/logout"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Logged out successfully",
    "data": []
}
 

Request      

POST api/v1/auth/coach/logout

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get coach profile

requires authentication

Get the authenticated coach user's profile information.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/auth/coach/me" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/coach/me"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Profile retrieved successfully",
    "data": {
        "user": {
            "id": 1,
            "name": "Coach User",
            "email": "coach@ruhline.com",
            "email_verified_at": null,
            "roles": [
                "coach"
            ]
        }
    }
}
 

Request      

GET api/v1/auth/coach/me

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Change password

requires authentication

Change the authenticated coach's password. The coach must provide their current password for verification.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/coach/change-password" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"current_password\": \"oldpassword123\",
    \"password\": \"newpassword123\",
    \"password_confirmation\": \"newpassword123\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/coach/change-password"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "current_password": "oldpassword123",
    "password": "newpassword123",
    "password_confirmation": "newpassword123"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Password changed successfully",
    "data": {
        "message": "Your password has been changed successfully."
    }
}
 

Example response (422):


{
    "success": false,
    "message": "The given data was invalid.",
    "errors": {
        "current_password": [
            "The current password is incorrect."
        ]
    }
}
 

Request      

POST api/v1/auth/coach/change-password

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

current_password   string     

The coach's current password. Example: oldpassword123

password   string     

The new password. Must be at least 8 characters. Example: newpassword123

password_confirmation   string     

Password confirmation. Must match password. Example: newpassword123

Update coach profile

requires authentication

Update the authenticated coach's profile. All fields are optional; only provided fields are updated. Supports: first_name, last_name, email, phone, phone_country_code_id, coach_type, address fields, profile_image.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/auth/coach/update-profile" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "first_name=John"\
    --form "last_name=Doe"\
    --form "email=coach@example.com"\
    --form "phone=1234567890"\
    --form "phone_country_code_id=1"\
    --form "coach_type=Mentor"\
    --form "address_line_1=123 Main St"\
    --form "address_line_2=Apt 4B"\
    --form "landmark=Near Central Park"\
    --form "country_id=1"\
    --form "state_id=1"\
    --form "city_id=1"\
    --form "postal_code=12345"\
    --form "profile_image=@C:\Users\AMITB\AppData\Local\Temp\php3925.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/coach/update-profile"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('first_name', 'John');
body.append('last_name', 'Doe');
body.append('email', 'coach@example.com');
body.append('phone', '1234567890');
body.append('phone_country_code_id', '1');
body.append('coach_type', 'Mentor');
body.append('address_line_1', '123 Main St');
body.append('address_line_2', 'Apt 4B');
body.append('landmark', 'Near Central Park');
body.append('country_id', '1');
body.append('state_id', '1');
body.append('city_id', '1');
body.append('postal_code', '12345');
body.append('profile_image', document.querySelector('input[name="profile_image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
  "success": true,
  "message": "Profile updated successfully",
  "data": { "user": { "id": 1, "name": "John Doe", "email": "coach@example.com", "profile": { ... } } }
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Example response (422):


{ "success": false, "message": "Validation failed", "errors": { ... } }
 

Request      

POST api/v1/auth/coach/update-profile

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

first_name   string  optional    

Optional. The coach's first name. Example: John

last_name   string  optional    

Optional. The coach's last name. Example: Doe

email   string  optional    

Optional. The coach's email. Must be unique. Example: coach@example.com

phone   string  optional    

Optional. Phone number. Example: 1234567890

phone_country_code_id   integer  optional    

Optional. ID of phone country code. Example: 1

coach_type   string  optional    

Optional. One of: Mentor, Yoga Trainer. Example: Mentor

address_line_1   string  optional    

Optional. Primary address line. Example: 123 Main St

address_line_2   string  optional    

Optional. Secondary address line. Example: Apt 4B

landmark   string  optional    

Optional. Landmark. Example: Near Central Park

country_id   integer  optional    

Optional. Country ID. Example: 1

state_id   integer  optional    

Optional. State ID. Example: 1

city_id   integer  optional    

Optional. City ID. Example: 1

postal_code   string  optional    

Optional. Postal code. Example: 12345

profile_image   file  optional    

Optional. Profile image (jpeg, png, jpg, gif, max 2MB). Example: C:\Users\AMITB\AppData\Local\Temp\php3925.tmp

Get coach payment details.

requires authentication

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/auth/coach/payment-details" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/coach/payment-details"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/auth/coach/payment-details

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Update coach payment details.

requires authentication

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/auth/coach/payment-details" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"account_number\": \"b\",
    \"country\": \"n\",
    \"bank_name\": \"g\",
    \"account_holder_name\": \"z\",
    \"swiss_code\": \"m\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/auth/coach/payment-details"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "account_number": "b",
    "country": "n",
    "bank_name": "g",
    "account_holder_name": "z",
    "swiss_code": "m"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/auth/coach/payment-details

PATCH api/v1/auth/coach/payment-details

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

account_number   string     

Auto-generated from validation rules for account_number. Must not be greater than 100 characters. Example: b

country   string     

Auto-generated from validation rules for country. Must not be greater than 100 characters. Example: n

bank_name   string     

Auto-generated from validation rules for bank_name. Must not be greater than 255 characters. Example: g

account_holder_name   string     

Auto-generated from validation rules for account_holder_name. Must not be greater than 255 characters. Example: z

swiss_code   string     

Auto-generated from validation rules for swiss_code. Must not be greater than 100 characters. Example: m

Checkout (Customer)

APIs for checkout preview and Stripe Checkout Session payment.

Base path: /api/v1/checkout

POST api/v1/checkout/webhook/stripe

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/checkout/webhook/stripe" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/checkout/webhook/stripe"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/checkout/webhook/stripe

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/checkout/preview

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/checkout/preview" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"program_id\": 16,
    \"coach_id\": 16,
    \"slot_start_at\": \"2026-07-07T13:46:41\",
    \"coupon_code\": \"n\",
    \"timezone\": \"Antarctica\\/Rothera\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/checkout/preview"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "program_id": 16,
    "coach_id": 16,
    "slot_start_at": "2026-07-07T13:46:41",
    "coupon_code": "n",
    "timezone": "Antarctica\/Rothera"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/checkout/preview

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

program_id   integer     

Auto-generated from validation rules for program_id. The id of an existing record in the programs table. Example: 16

coach_id   integer     

Auto-generated from validation rules for coach_id. The id of an existing record in the coaches table. Example: 16

slot_start_at   string     

Auto-generated from validation rules for slot_start_at. Must be a valid date. Example: 2026-07-07T13:46:41

coupon_code   string  optional    

Auto-generated from validation rules for coupon_code. Must not be greater than 50 characters. Example: n

timezone   string  optional    

Auto-generated from validation rules for timezone. Must be a valid time zone, such as Africa/Accra. Example: Antarctica/Rothera

POST api/v1/checkout/create-session

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/checkout/create-session" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"program_id\": 16,
    \"coach_id\": 16,
    \"slot_start_at\": \"2026-07-07T13:46:41\",
    \"coupon_code\": \"n\",
    \"timezone\": \"Antarctica\\/Rothera\",
    \"success_url\": \"http:\\/\\/www.okuneva.com\\/fugiat-sunt-nihil-accusantium-harum-mollitia.html\",
    \"cancel_url\": \"http:\\/\\/www.considine.com\\/provident-perspiciatis-quo-omnis-nostrum-aut-adipisci-quidem\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/checkout/create-session"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "program_id": 16,
    "coach_id": 16,
    "slot_start_at": "2026-07-07T13:46:41",
    "coupon_code": "n",
    "timezone": "Antarctica\/Rothera",
    "success_url": "http:\/\/www.okuneva.com\/fugiat-sunt-nihil-accusantium-harum-mollitia.html",
    "cancel_url": "http:\/\/www.considine.com\/provident-perspiciatis-quo-omnis-nostrum-aut-adipisci-quidem"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/checkout/create-session

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

program_id   integer     

Auto-generated from validation rules for program_id. The id of an existing record in the programs table. Example: 16

coach_id   integer     

Auto-generated from validation rules for coach_id. The id of an existing record in the coaches table. Example: 16

slot_start_at   string     

Auto-generated from validation rules for slot_start_at. Must be a valid date. Example: 2026-07-07T13:46:41

coupon_code   string  optional    

Auto-generated from validation rules for coupon_code. Must not be greater than 50 characters. Example: n

timezone   string  optional    

Auto-generated from validation rules for timezone. Must be a valid time zone, such as Africa/Accra. Example: Antarctica/Rothera

success_url   string     

Auto-generated from validation rules for success_url. Must be a valid URL. Example: http://www.okuneva.com/fugiat-sunt-nihil-accusantium-harum-mollitia.html

cancel_url   string     

Auto-generated from validation rules for cancel_url. Must be a valid URL. Example: http://www.considine.com/provident-perspiciatis-quo-omnis-nostrum-aut-adipisci-quidem

GET api/v1/checkout/orders

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/checkout/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"architecto\",
    \"payment_status\": \"architecto\",
    \"per_page\": 22,
    \"page\": 67
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/checkout/orders"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "status": "architecto",
    "payment_status": "architecto",
    "per_page": 22,
    "page": 67
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/checkout/orders

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

status   string  optional    

Example: architecto

payment_status   string  optional    

Example: architecto

per_page   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 22

page   integer  optional    

Must be at least 1. Example: 67

GET api/v1/checkout/order/{orderId}

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/checkout/order/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/checkout/order/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/checkout/order/{orderId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

orderId   string     

Example: architecto

GET api/v1/checkout/sessions/upcoming

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/checkout/sessions/upcoming" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/checkout/sessions/upcoming"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/checkout/sessions/upcoming

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Customer - Enrollments

GET api/v1/customer/enrollments

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"occurrence_type\": \"architecto\",
    \"enrollment_status\": \"architecto\",
    \"per_page\": 22,
    \"page\": 67
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "occurrence_type": "architecto",
    "enrollment_status": "architecto",
    "per_page": 22,
    "page": 67
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

occurrence_type   string  optional    

Example: architecto

enrollment_status   string  optional    

Example: architecto

per_page   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 22

page   integer  optional    

Must be at least 1. Example: 67

GET api/v1/customer/enrollments/{enrollmentId}

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

GET api/v1/customer/enrollments/{enrollmentId}/sessions

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/sessions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"session_ui_phase\": \"architecto\",
    \"per_page\": 22,
    \"page\": 67
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/sessions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "session_ui_phase": "architecto",
    "per_page": 22,
    "page": 67
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/sessions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

Body Parameters

session_ui_phase   string  optional    

Example: architecto

per_page   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 22

page   integer  optional    

Must be at least 1. Example: 67

GET api/v1/customer/enrollments/{enrollmentId}/sessions/{sessionId}/available-slots

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/sessions/architecto/available-slots" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date\": \"2026-07-07\",
    \"timezone\": \"Asia\\/Yekaterinburg\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/sessions/architecto/available-slots"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "date": "2026-07-07",
    "timezone": "Asia\/Yekaterinburg"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/sessions/{sessionId}/available-slots

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

sessionId   string     

Example: architecto

Body Parameters

date   string     

Auto-generated from validation rules for date. Must be a valid date in the format Y-m-d. Example: 2026-07-07

timezone   string  optional    

Auto-generated from validation rules for timezone. Must be a valid time zone, such as Africa/Accra. Example: Asia/Yekaterinburg

POST api/v1/customer/enrollments/{enrollmentId}/sessions/{sessionId}/schedule

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/sessions/architecto/schedule" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slot_start_at\": \"2026-07-07T13:46:43\",
    \"timezone\": \"Asia\\/Yekaterinburg\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/sessions/architecto/schedule"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "slot_start_at": "2026-07-07T13:46:43",
    "timezone": "Asia\/Yekaterinburg"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/customer/enrollments/{enrollmentId}/sessions/{sessionId}/schedule

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

sessionId   string     

Example: architecto

Body Parameters

slot_start_at   string     

Auto-generated from validation rules for slot_start_at. Must be a valid date. Example: 2026-07-07T13:46:43

timezone   string  optional    

Auto-generated from validation rules for timezone. Must be a valid time zone, such as Africa/Accra. Example: Asia/Yekaterinburg

POST api/v1/customer/enrollments/{enrollmentId}/sessions/{sessionId}/reschedule

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/sessions/architecto/reschedule" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"slot_start_at\": \"2026-07-07T13:46:43\",
    \"timezone\": \"Asia\\/Yekaterinburg\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/sessions/architecto/reschedule"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "slot_start_at": "2026-07-07T13:46:43",
    "timezone": "Asia\/Yekaterinburg"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/customer/enrollments/{enrollmentId}/sessions/{sessionId}/reschedule

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

sessionId   string     

Example: architecto

Body Parameters

slot_start_at   string     

Auto-generated from validation rules for slot_start_at. Must be a valid date. Example: 2026-07-07T13:46:43

timezone   string  optional    

Auto-generated from validation rules for timezone. Must be a valid time zone, such as Africa/Accra. Example: Asia/Yekaterinburg

POST api/v1/customer/enrollments/{enrollmentId}/sessions/{sessionId}/cancel

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/sessions/architecto/cancel" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/sessions/architecto/cancel"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/customer/enrollments/{enrollmentId}/sessions/{sessionId}/cancel

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

sessionId   string     

Example: architecto

POST api/v1/customer/enrollments/{enrollmentId}/sessions/{sessionId}/video-token

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/sessions/architecto/video-token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/sessions/architecto/video-token"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/customer/enrollments/{enrollmentId}/sessions/{sessionId}/video-token

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

sessionId   string     

Example: architecto

Customer - Disputes

GET api/v1/dispute/form-options

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/dispute/form-options" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/dispute/form-options"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/dispute/form-options

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/dispute

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/dispute" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/dispute"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/dispute

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/dispute

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/dispute" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "subject=b"\
    --form "category=issue_with_payments"\
    --form "description=Et animi quos velit et fugiat."\
    --form "program_id=16"\
    --form "coach_id=16"\
    --form "checkout_order_id=16"\
    --form "attachments[]=@C:\Users\AMITB\AppData\Local\Temp\php3AD6.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/dispute"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('subject', 'b');
body.append('category', 'issue_with_payments');
body.append('description', 'Et animi quos velit et fugiat.');
body.append('program_id', '16');
body.append('coach_id', '16');
body.append('checkout_order_id', '16');
body.append('attachments[]', document.querySelector('input[name="attachments[]"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/dispute

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

subject   string     

Auto-generated from validation rules for subject. Must not be greater than 255 characters. Example: b

category   string     

Auto-generated from validation rules for category. Example: issue_with_payments

Must be one of:
  • issue_with_program
  • issue_with_coach
  • issue_with_payments
description   string     

Auto-generated from validation rules for description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

program_id   integer  optional    

Auto-generated from validation rules for program_id. The id of an existing record in the programs table. Example: 16

coach_id   integer  optional    

Auto-generated from validation rules for coach_id. The id of an existing record in the coaches table. Example: 16

checkout_order_id   integer  optional    

Auto-generated from validation rules for checkout_order_id. The id of an existing record in the checkout_orders table. Example: 16

attachments   file[]  optional    

Auto-generated from validation rules for attachments.*. Must be a file. Must not be greater than 250 kilobytes.

GET api/v1/dispute/{id}

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/dispute/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/dispute/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/dispute/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the dispute. Example: architecto

PUT api/v1/dispute/{id}

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/dispute/architecto" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "subject=b"\
    --form "category=issue_with_program"\
    --form "description=Et animi quos velit et fugiat."\
    --form "program_id=16"\
    --form "coach_id=16"\
    --form "checkout_order_id=16"\
    --form "attachments[]=@C:\Users\AMITB\AppData\Local\Temp\php3AE7.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/dispute/architecto"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('subject', 'b');
body.append('category', 'issue_with_program');
body.append('description', 'Et animi quos velit et fugiat.');
body.append('program_id', '16');
body.append('coach_id', '16');
body.append('checkout_order_id', '16');
body.append('attachments[]', document.querySelector('input[name="attachments[]"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Request      

PUT api/v1/dispute/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the dispute. Example: architecto

Body Parameters

subject   string     

Auto-generated from validation rules for subject. Must not be greater than 255 characters. Example: b

category   string     

Auto-generated from validation rules for category. Example: issue_with_program

Must be one of:
  • issue_with_program
  • issue_with_coach
  • issue_with_payments
description   string     

Auto-generated from validation rules for description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

program_id   integer  optional    

Auto-generated from validation rules for program_id. The id of an existing record in the programs table. Example: 16

coach_id   integer  optional    

Auto-generated from validation rules for coach_id. The id of an existing record in the coaches table. Example: 16

checkout_order_id   integer  optional    

Auto-generated from validation rules for checkout_order_id. The id of an existing record in the checkout_orders table. Example: 16

attachments   file[]  optional    

Auto-generated from validation rules for attachments.*. Must be a file. Must not be greater than 250 kilobytes.

PATCH api/v1/dispute/{id}

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/dispute/architecto" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "subject=b"\
    --form "category=issue_with_payments"\
    --form "description=Et animi quos velit et fugiat."\
    --form "program_id=16"\
    --form "coach_id=16"\
    --form "checkout_order_id=16"\
    --form "attachments[]=@C:\Users\AMITB\AppData\Local\Temp\php3AE8.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/dispute/architecto"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('subject', 'b');
body.append('category', 'issue_with_payments');
body.append('description', 'Et animi quos velit et fugiat.');
body.append('program_id', '16');
body.append('coach_id', '16');
body.append('checkout_order_id', '16');
body.append('attachments[]', document.querySelector('input[name="attachments[]"]').files[0]);

fetch(url, {
    method: "PATCH",
    headers,
    body,
}).then(response => response.json());

Request      

PATCH api/v1/dispute/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the dispute. Example: architecto

Body Parameters

subject   string     

Auto-generated from validation rules for subject. Must not be greater than 255 characters. Example: b

category   string     

Auto-generated from validation rules for category. Example: issue_with_payments

Must be one of:
  • issue_with_program
  • issue_with_coach
  • issue_with_payments
description   string     

Auto-generated from validation rules for description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

program_id   integer  optional    

Auto-generated from validation rules for program_id. The id of an existing record in the programs table. Example: 16

coach_id   integer  optional    

Auto-generated from validation rules for coach_id. The id of an existing record in the coaches table. Example: 16

checkout_order_id   integer  optional    

Auto-generated from validation rules for checkout_order_id. The id of an existing record in the checkout_orders table. Example: 16

attachments   file[]  optional    

Auto-generated from validation rules for attachments.*. Must be a file. Must not be greater than 250 kilobytes.

DELETE api/v1/dispute/{id}

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/dispute/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/dispute/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/dispute/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the dispute. Example: architecto

Customer - Program Reviews

GET api/v1/customer/reviews

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/reviews" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"per_page\": 1,
    \"page\": 22
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/reviews"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "per_page": 1,
    "page": 22
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/reviews

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

per_page   integer  optional    

Must be at least 1. Must not be greater than 100. Example: 1

page   integer  optional    

Must be at least 1. Example: 22

POST api/v1/customer/reviews

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/customer/reviews" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"program_enrollment_id\": 16,
    \"rating\": 2,
    \"body\": \"g\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/reviews"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "program_enrollment_id": 16,
    "rating": 2,
    "body": "g"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/customer/reviews

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

program_enrollment_id   integer     

Auto-generated from validation rules for program_enrollment_id. The id of an existing record in the program_enrollments table. Example: 16

rating   integer     

Auto-generated from validation rules for rating. Must be at least 1. Must not be greater than 5. Example: 2

body   string     

Auto-generated from validation rules for body. Must be at least 1 character. Must not be greater than 5000 characters. Example: g

PUT api/v1/customer/reviews/{reviewId}

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/customer/reviews/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"rating\": 1,
    \"body\": \"n\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/reviews/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "rating": 1,
    "body": "n"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/customer/reviews/{reviewId}

PATCH api/v1/customer/reviews/{reviewId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

reviewId   string     

Example: architecto

Body Parameters

rating   integer  optional    

Auto-generated from validation rules for rating. Must be at least 1. Must not be greater than 5. Example: 1

body   string  optional    

Auto-generated from validation rules for body. Must be at least 1 character. Must not be greater than 5000 characters. Example: n

DELETE api/v1/customer/reviews/{reviewId}

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/customer/reviews/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/reviews/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/customer/reviews/{reviewId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

reviewId   string     

Example: architecto

Programs (Guest / no auth)

Unauthenticated catalog: list programs and program detail. Only programs whose category is active are returned. Does not include program structure or modules.

Base path: /api/v1/programs

List programs (optional filter by active category).

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/programs?page=1&per_page=15&program_category_id=2" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/programs"
);

const params = {
    "page": "1",
    "per_page": "15",
    "program_category_id": "2",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Program category not found or inactive."
}
 

Request      

GET api/v1/programs

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

Example: 1

per_page   integer  optional    

Example: 15

program_category_id   integer  optional    

optional Only programs in this category (must be active). Example: 2

List programs in a specific active category.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/programs/category/1?page=1&per_page=15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/programs/category/1"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Program category not found or inactive."
}
 

Request      

GET api/v1/programs/category/{categoryId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

categoryId   integer     

Example: 1

Query Parameters

page   integer  optional    

Example: 1

per_page   integer  optional    

Example: 15

List facilitators (coaches) assigned to one visible program.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/programs/1/facilitators?page=1&per_page=15&coach_type=Mentor" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/programs/1/facilitators"
);

const params = {
    "page": "1",
    "per_page": "15",
    "coach_type": "Mentor",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Program not found or unavailable."
}
 

Request      

GET api/v1/programs/{id}/facilitators

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

Example: 1

Query Parameters

page   integer  optional    

Example: 1

per_page   integer  optional    

Example: 15

coach_type   string  optional    

optional Filter: Mentor or Yoga Trainer. Example: Mentor

List available slots for one facilitator on one date.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/programs/1/facilitators/3/slots?date=2026-04-10&timezone=Asia%2FKolkata" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"date\": \"2026-07-07\",
    \"timezone\": \"Asia\\/Yekaterinburg\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/programs/1/facilitators/3/slots"
);

const params = {
    "date": "2026-04-10",
    "timezone": "Asia/Kolkata",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "date": "2026-07-07",
    "timezone": "Asia\/Yekaterinburg"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Program not found or unavailable."
}
 

Request      

GET api/v1/programs/{id}/facilitators/{coachId}/slots

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

Program ID. Example: 1

coachId   integer     

Coach ID assigned to this program. Example: 3

Query Parameters

date   string     

Date in YYYY-MM-DD. Example: 2026-04-10

timezone   string  optional    

optional IANA timezone name. Defaults to UTC. Example: Asia/Kolkata

Body Parameters

date   string     

Auto-generated from validation rules for date. Must be a valid date in the format Y-m-d. Example: 2026-07-07

timezone   string  optional    

Auto-generated from validation rules for timezone. Must be a valid time zone, such as Africa/Accra. Example: Asia/Yekaterinburg

Program detail (marketing content only; no structure/modules).

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/programs/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/programs/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Program not found or unavailable."
}
 

Request      

GET api/v1/programs/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

Example: 1

Coaches (Guest / no auth)

Unauthenticated directory of admin-verified coaches only.

Base path: /api/v1/coaches

List coaches visible on the public directory.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/coaches?page=1&per_page=15&coach_type=Mentor" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/coaches"
);

const params = {
    "page": "1",
    "per_page": "15",
    "coach_type": "Mentor",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "Coaches retrieved successfully",
    "data": {
        "data": [],
        "links": {
            "first": "https://ruhline-api.test/api/v1/coaches?page=1",
            "last": "https://ruhline-api.test/api/v1/coaches?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": null,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "page": null,
                    "active": false
                },
                {
                    "url": "https://ruhline-api.test/api/v1/coaches?page=1",
                    "label": "1",
                    "page": 1,
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "page": null,
                    "active": false
                }
            ],
            "path": "https://ruhline-api.test/api/v1/coaches",
            "per_page": 15,
            "to": null,
            "total": 0
        }
    }
}
 

Request      

GET api/v1/coaches

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

Example: 1

per_page   integer  optional    

Example: 15

coach_type   string  optional    

optional Filter: Mentor or Yoga Trainer. Example: Mentor

Coach - Programs

APIs for coaches to view programs they are assigned to.

Routes are prefixed with: /api/v1/program

List programs assigned to the authenticated coach.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program?page=1&per_page=15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

Get details of one program assigned to the authenticated coach.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   integer     

The ID of the program. Example: 1

Coach - Program Availability

APIs for coaches to manage their own availability and time-off per assigned program.

Routes are prefixed with: /api/v1/program

Get coach availability and time-off for an assigned program.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/1/availability" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/1/availability"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/availability

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   integer     

The ID of the assigned program. Example: 1

Replace coach availability rules for one assigned program.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/1/availability" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"rules\": [
        {
            \"day_of_week\": 4,
            \"start_time\": \"13:46\",
            \"end_time\": \"13:46\",
            \"effective_from\": \"2026-07-07\",
            \"effective_to\": \"2052-07-30\",
            \"is_active\": false
        }
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/1/availability"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "rules": [
        {
            "day_of_week": 4,
            "start_time": "13:46",
            "end_time": "13:46",
            "effective_from": "2026-07-07",
            "effective_to": "2052-07-30",
            "is_active": false
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/{programId}/availability

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   integer     

The ID of the assigned program. Example: 1

Body Parameters

rules   object[]     

Auto-generated from validation rules for rules.

day_of_week   integer     

Auto-generated from validation rules for rules.*.day_of_week. Must be at least 0. Must not be greater than 6. Example: 4

start_time   string     

Auto-generated from validation rules for rules.*.start_time. Must be a valid date in the format H:i. Example: 13:46

end_time   string     

Auto-generated from validation rules for rules.*.end_time. Must be a valid date in the format H:i. Example: 13:46

effective_from   string     

Auto-generated from validation rules for rules.*.effective_from. Must be a valid date in the format Y-m-d. Example: 2026-07-07

effective_to   string  optional    

Auto-generated from validation rules for rules.*.effective_to. Must be a valid date in the format Y-m-d. Must be a date after or equal to rules.*.effective_from. Example: 2052-07-30

is_active   boolean  optional    

Auto-generated from validation rules for rules.*.is_active. Example: false

Replace coach availability rules for one assigned program.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/1/availability" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"rules\": [
        {
            \"day_of_week\": 4,
            \"start_time\": \"13:46\",
            \"end_time\": \"13:46\",
            \"effective_from\": \"2026-07-07\",
            \"effective_to\": \"2052-07-30\",
            \"is_active\": false
        }
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/1/availability"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "rules": [
        {
            "day_of_week": 4,
            "start_time": "13:46",
            "end_time": "13:46",
            "effective_from": "2026-07-07",
            "effective_to": "2052-07-30",
            "is_active": false
        }
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/{programId}/availability

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   integer     

The ID of the assigned program. Example: 1

Body Parameters

rules   object[]     

Auto-generated from validation rules for rules.

day_of_week   integer     

Auto-generated from validation rules for rules.*.day_of_week. Must be at least 0. Must not be greater than 6. Example: 4

start_time   string     

Auto-generated from validation rules for rules.*.start_time. Must be a valid date in the format H:i. Example: 13:46

end_time   string     

Auto-generated from validation rules for rules.*.end_time. Must be a valid date in the format H:i. Example: 13:46

effective_from   string     

Auto-generated from validation rules for rules.*.effective_from. Must be a valid date in the format Y-m-d. Example: 2026-07-07

effective_to   string  optional    

Auto-generated from validation rules for rules.*.effective_to. Must be a valid date in the format Y-m-d. Must be a date after or equal to rules.*.effective_from. Example: 2052-07-30

is_active   boolean  optional    

Auto-generated from validation rules for rules.*.is_active. Example: false

Add a time-off block for one assigned program.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/program/1/time-off" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"start_at\": \"2026-07-07T13:46:42\",
    \"end_at\": \"2052-07-30\",
    \"reason\": \"n\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/1/time-off"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "start_at": "2026-07-07T13:46:42",
    "end_at": "2052-07-30",
    "reason": "n"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/program/{programId}/time-off

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   integer     

The ID of the assigned program. Example: 1

Body Parameters

start_at   string     

Auto-generated from validation rules for start_at. Must be a valid date. Example: 2026-07-07T13:46:42

end_at   string     

Auto-generated from validation rules for end_at. Must be a valid date. Must be a date after start_at. Example: 2052-07-30

reason   string  optional    

Auto-generated from validation rules for reason. Must not be greater than 500 characters. Example: n

Delete one time-off block for an assigned program.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/program/1/time-off/5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/1/time-off/5"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/program/{programId}/time-off/{timeOffId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   integer     

The ID of the assigned program. Example: 1

timeOffId   integer     

The ID of the time-off block. Example: 5

Coach - Program Structure

List program structure for a coach, including flags about whether each module can be edited and whether a coach-specific copy exists.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

GET api/v1/program/{programId}/structure/{structureId}/quote

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/quote" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/quote"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/quote

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Goal Settings module has no extra configuration; coaches get metadata only.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/goal-settings-module" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/goal-settings-module"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/goal-settings-module

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Habit Tracker module has no extra configuration; coaches get metadata only.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/habit-tracker-module" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/habit-tracker-module"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/habit-tracker-module

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

GET api/v1/program/{programId}/structure/{structureId}/card-game/question-sets

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/card-game/question-sets" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/card-game/question-sets"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/card-game/question-sets

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

GET api/v1/program/{programId}/structure/{structureId}/card-game/question-sets/{setId}/questions

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/card-game/question-sets/architecto/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/card-game/question-sets/architecto/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/card-game/question-sets/{setId}/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

GET api/v1/program/{programId}/structure/{structureId}/card-game/cards

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/card-game/cards" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/card-game/cards"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/card-game/cards

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

GET api/v1/program/{programId}/structure/{structureId}/intermediate-values

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/intermediate-values" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/intermediate-values"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/intermediate-values

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

GET api/v1/program/{programId}/structure/{structureId}/intermediate-eight-most-common-mistakes

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/intermediate-eight-most-common-mistakes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/intermediate-eight-most-common-mistakes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/intermediate-eight-most-common-mistakes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

GET api/v1/program/{programId}/structure/{structureId}/intermediate-goal-settings

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/intermediate-goal-settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/intermediate-goal-settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/intermediate-goal-settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

GET api/v1/program/{programId}/structure/{structureId}/intermediate-questions-goal-why

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/intermediate-questions-goal-why" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/intermediate-questions-goal-why"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/intermediate-questions-goal-why

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

GET api/v1/program/{programId}/structure/{structureId}/intermediate-y-method

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/intermediate-y-method" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/intermediate-y-method"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/intermediate-y-method

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

List words for a Find your Motivation module.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/words

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Create a coach-specific word (clones coach copy on first write).

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"word\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "word": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/program/{programId}/structure/{structureId}/words

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

word   string     

Must not be greater than 255 characters. Example: b

Update a coach-specific word.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"word\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "word": "b"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/{programId}/structure/{structureId}/words/{wordId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

wordId   string     

Example: architecto

Body Parameters

word   string     

Must not be greater than 255 characters. Example: b

Update a coach-specific word.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"word\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "word": "b"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/{programId}/structure/{structureId}/words/{wordId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

wordId   string     

Example: architecto

Body Parameters

word   string     

Must not be greater than 255 characters. Example: b

Delete a coach-specific word.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/program/{programId}/structure/{structureId}/words/{wordId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

wordId   string     

Example: architecto

Reorder coach-specific words.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/{programId}/structure/{structureId}/words/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Reorder coach-specific words.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/words/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/{programId}/structure/{structureId}/words/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

List Values questions for a coach (program defaults or coach copy, depending on whether a copy exists).

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/values/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Create a coach-specific Values question (clones on first write).

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/program/{programId}/structure/{structureId}/values/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

type   string  optional    
question_text   string     

Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Must not be greater than 500 characters.

Update a coach-specific Values question.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/{programId}/structure/{structureId}/values/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string  optional    
question_text   string     

Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Must not be greater than 500 characters.

Update a coach-specific Values question.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/{programId}/structure/{structureId}/values/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string  optional    
question_text   string     

Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Must not be greater than 500 characters.

Delete a coach-specific Values question.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/program/{programId}/structure/{structureId}/values/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

Reorder coach-specific Values questions.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/{programId}/structure/{structureId}/values/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Reorder coach-specific Values questions.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/values/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/{programId}/structure/{structureId}/values/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

List Who am I questions for a coach.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/who-am-i/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Create a coach-specific Who am I question.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/program/{programId}/structure/{structureId}/who-am-i/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

type   string  optional    
question_text   string     

Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Must not be greater than 500 characters.

Update a coach-specific Who am I question.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/{programId}/structure/{structureId}/who-am-i/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string  optional    
question_text   string     

Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Must not be greater than 500 characters.

Update a coach-specific Who am I question.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/{programId}/structure/{structureId}/who-am-i/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string  optional    
question_text   string     

Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Must not be greater than 500 characters.

Delete a coach-specific Who am I question.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/program/{programId}/structure/{structureId}/who-am-i/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

Reorder coach-specific Who am I questions.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/{programId}/structure/{structureId}/who-am-i/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Reorder coach-specific Who am I questions.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/who-am-i/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/{programId}/structure/{structureId}/who-am-i/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

List life elements for a coach Wheel of Life module.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Add a life element to a coach-specific Wheel of Life module.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

Update a coach-specific life element.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements/{elementId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

Update a coach-specific life element.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements/{elementId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

Body Parameters

name   string     

Must not be greater than 255 characters. Example: b

Delete a coach-specific life element.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements/{elementId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

Reorder coach-specific life elements.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Reorder coach-specific life elements.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

List questions for a coach Wheel of Life element.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

Add a question to a coach-specific Wheel of Life element.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

Body Parameters

type   string  optional    
question_text   string     

Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Must not be greater than 500 characters.

Update a coach-specific Wheel of Life question.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string  optional    
question_text   string     

Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Must not be greater than 500 characters.

Update a coach-specific Wheel of Life question.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string  optional    
question_text   string     

Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Must not be greater than 500 characters.

Delete a coach-specific Wheel of Life question.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

questionId   string     

Example: architecto

Reorder coach-specific Wheel of Life questions.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Reorder coach-specific Wheel of Life questions.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/{programId}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

List upload documents for a coach.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/{programId}/structure/{structureId}/upload-documents

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Upload one or more documents to an Upload Documents module.

Single file: multipart field "file" (optional "original_name"). Multiple files: multipart field "files[]" (array of files).

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "original_name=b"\
    --form "file=@C:\Users\AMITB\AppData\Local\Temp\php40E4.tmp" \
    --form "files[]=@C:\Users\AMITB\AppData\Local\Temp\php40F5.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('original_name', 'b');
body.append('file', document.querySelector('input[name="file"]').files[0]);
body.append('files[]', document.querySelector('input[name="files[]"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/program/{programId}/structure/{structureId}/upload-documents

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

file   file  optional    

Must be a file. Must not be greater than 20480 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php40E4.tmp

files   file[]  optional    

Must be a file. Must not be greater than 20480 kilobytes.

original_name   string  optional    

Must not be greater than 255 characters. Example: b

Update a coach document's original name.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"original_name\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "original_name": "b"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/{programId}/structure/{structureId}/upload-documents/{documentId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

documentId   string     

Example: architecto

Body Parameters

original_name   string  optional    

Must not be greater than 255 characters. Example: b

Update a coach document's original name.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"original_name\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "original_name": "b"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/{programId}/structure/{structureId}/upload-documents/{documentId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

documentId   string     

Example: architecto

Body Parameters

original_name   string  optional    

Must not be greater than 255 characters. Example: b

Delete a coach document (and remove its file from storage).

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/program/{programId}/structure/{structureId}/upload-documents/{documentId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

documentId   string     

Example: architecto

Reorder coach documents.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/{programId}/structure/{structureId}/upload-documents/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Reorder coach documents.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/architecto/structure/architecto/upload-documents/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/{programId}/structure/{structureId}/upload-documents/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

programId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Coach - Disputes

GET api/v1/coach/dispute/form-options

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/coach/dispute/form-options" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/coach/dispute/form-options"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/coach/dispute/form-options

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/coach/dispute

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/coach/dispute" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/coach/dispute"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/coach/dispute

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

POST api/v1/coach/dispute

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/coach/dispute" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "subject=b"\
    --form "category=issue_with_program"\
    --form "description=Et animi quos velit et fugiat."\
    --form "program_id=16"\
    --form "payout_id=16"\
    --form "attachments[]=@C:\Users\AMITB\AppData\Local\Temp\php3AA4.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/coach/dispute"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('subject', 'b');
body.append('category', 'issue_with_program');
body.append('description', 'Et animi quos velit et fugiat.');
body.append('program_id', '16');
body.append('payout_id', '16');
body.append('attachments[]', document.querySelector('input[name="attachments[]"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/coach/dispute

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

subject   string     

Auto-generated from validation rules for subject. Must not be greater than 255 characters. Example: b

category   string     

Auto-generated from validation rules for category. Example: issue_with_program

Must be one of:
  • issue_with_program
  • issue_with_payments
description   string     

Auto-generated from validation rules for description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

program_id   integer  optional    

Auto-generated from validation rules for program_id. This field is required when category is issue_with_program. The id of an existing record in the programs table. Example: 16

payout_id   integer  optional    

Auto-generated from validation rules for payout_id. This field is required when category is issue_with_payments. The id of an existing record in the payouts table. Example: 16

attachments   file[]  optional    

Auto-generated from validation rules for attachments.*. Must be a file. Must not be greater than 250 kilobytes.

GET api/v1/coach/dispute/{id}

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/coach/dispute/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/coach/dispute/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/coach/dispute/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the dispute. Example: architecto

PUT api/v1/coach/dispute/{id}

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/coach/dispute/architecto" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "subject=b"\
    --form "category=issue_with_payments"\
    --form "description=Et animi quos velit et fugiat."\
    --form "program_id=16"\
    --form "payout_id=16"\
    --form "attachments[]=@C:\Users\AMITB\AppData\Local\Temp\php3AA5.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/coach/dispute/architecto"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('subject', 'b');
body.append('category', 'issue_with_payments');
body.append('description', 'Et animi quos velit et fugiat.');
body.append('program_id', '16');
body.append('payout_id', '16');
body.append('attachments[]', document.querySelector('input[name="attachments[]"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Request      

PUT api/v1/coach/dispute/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the dispute. Example: architecto

Body Parameters

subject   string     

Auto-generated from validation rules for subject. Must not be greater than 255 characters. Example: b

category   string     

Auto-generated from validation rules for category. Example: issue_with_payments

Must be one of:
  • issue_with_program
  • issue_with_payments
description   string     

Auto-generated from validation rules for description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

program_id   integer  optional    

Auto-generated from validation rules for program_id. This field is required when category is issue_with_program. The id of an existing record in the programs table. Example: 16

payout_id   integer  optional    

Auto-generated from validation rules for payout_id. This field is required when category is issue_with_payments. The id of an existing record in the payouts table. Example: 16

attachments   file[]  optional    

Auto-generated from validation rules for attachments.*. Must be a file. Must not be greater than 250 kilobytes.

PATCH api/v1/coach/dispute/{id}

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/coach/dispute/architecto" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "subject=b"\
    --form "category=issue_with_program"\
    --form "description=Et animi quos velit et fugiat."\
    --form "program_id=16"\
    --form "payout_id=16"\
    --form "attachments[]=@C:\Users\AMITB\AppData\Local\Temp\php3AB6.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/coach/dispute/architecto"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('subject', 'b');
body.append('category', 'issue_with_program');
body.append('description', 'Et animi quos velit et fugiat.');
body.append('program_id', '16');
body.append('payout_id', '16');
body.append('attachments[]', document.querySelector('input[name="attachments[]"]').files[0]);

fetch(url, {
    method: "PATCH",
    headers,
    body,
}).then(response => response.json());

Request      

PATCH api/v1/coach/dispute/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the dispute. Example: architecto

Body Parameters

subject   string     

Auto-generated from validation rules for subject. Must not be greater than 255 characters. Example: b

category   string     

Auto-generated from validation rules for category. Example: issue_with_program

Must be one of:
  • issue_with_program
  • issue_with_payments
description   string     

Auto-generated from validation rules for description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

program_id   integer  optional    

Auto-generated from validation rules for program_id. This field is required when category is issue_with_program. The id of an existing record in the programs table. Example: 16

payout_id   integer  optional    

Auto-generated from validation rules for payout_id. This field is required when category is issue_with_payments. The id of an existing record in the payouts table. Example: 16

attachments   file[]  optional    

Auto-generated from validation rules for attachments.*. Must be a file. Must not be greater than 250 kilobytes.

DELETE api/v1/coach/dispute/{id}

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/coach/dispute/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/coach/dispute/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/coach/dispute/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the dispute. Example: architecto

Coach - Payouts

GET api/v1/payout

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/payout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/payout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/payout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Admin - About Page (CMS)

APIs for managing the About page content (Section 01, Mission/Vision/Values, Founder). Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/about-page

Get about page data (admin)

Returns the full about page content for editing.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/about-page" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/about-page"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/about-page

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Update about page

Update section 01, mission/vision/values, and founder. All sections are optional. Use multipart/form-data for image uploads.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/about-page" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"section_one\": [
        \"architecto\"
    ],
    \"mission_vision_values\": [
        \"architecto\"
    ],
    \"founder\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/about-page"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "section_one": [
        "architecto"
    ],
    "mission_vision_values": [
        "architecto"
    ],
    "founder": [
        "architecto"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/about-page

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

section_one   string[]  optional    

optional Section 01 (About Us).

headline   string  optional    

optional Example: architecto

about_us_image   file  optional    

optional Example: C:\Users\AMITB\AppData\Local\Temp\php37C5.tmp

secondary_headline   string  optional    

optional Example: architecto

description   string  optional    

optional Example: Eius et animi quos velit et.

mission_vision_values   string[]  optional    

optional Array of { type, title, description, icon } (type: mission, vision, values).

type   string  optional    

Auto-generated from validation rules for mission_vision_values.*.type. This field is required when mission_vision_values is present. Example: values

Must be one of:
  • mission
  • vision
  • values
title   string  optional    

Auto-generated from validation rules for mission_vision_values.*.title. Must not be greater than 255 characters. Example: m

description   string  optional    

Auto-generated from validation rules for mission_vision_values.*.description. Must not be greater than 2000 characters. Example: Aut adipisci quidem nostrum qui commodi incidunt iure.

icon   string  optional    

Auto-generated from validation rules for mission_vision_values.*.icon. Must not be greater than 500 characters. Example: r

icon_image   file  optional    

Auto-generated from validation rules for mission_vision_values.*.icon_image. Must be an image. Must not be greater than 1024 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php37C4.tmp

*   object  optional    
icon_image   file  optional    

optional Icon image upload (stored in icon field). Example: C:\Users\AMITB\AppData\Local\Temp\php37C6.tmp

founder   string[]  optional    

optional Section 03 (Our Founder).

headline   string  optional    

optional Example: architecto

secondary_headline   string  optional    

optional Example: architecto

image   file  optional    

optional Example: C:\Users\AMITB\AppData\Local\Temp\php37C7.tmp

description   string  optional    

optional Example: Eius et animi quos velit et.

Update about page

Update section 01, mission/vision/values, and founder. All sections are optional. Use multipart/form-data for image uploads.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/about-page" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"section_one\": [
        \"architecto\"
    ],
    \"mission_vision_values\": [
        \"architecto\"
    ],
    \"founder\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/about-page"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "section_one": [
        "architecto"
    ],
    "mission_vision_values": [
        "architecto"
    ],
    "founder": [
        "architecto"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/about-page

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

section_one   string[]  optional    

optional Section 01 (About Us).

headline   string  optional    

optional Example: architecto

about_us_image   file  optional    

optional Example: C:\Users\AMITB\AppData\Local\Temp\php37DB.tmp

secondary_headline   string  optional    

optional Example: architecto

description   string  optional    

optional Example: Eius et animi quos velit et.

mission_vision_values   string[]  optional    

optional Array of { type, title, description, icon } (type: mission, vision, values).

type   string  optional    

Auto-generated from validation rules for mission_vision_values.*.type. This field is required when mission_vision_values is present. Example: vision

Must be one of:
  • mission
  • vision
  • values
title   string  optional    

Auto-generated from validation rules for mission_vision_values.*.title. Must not be greater than 255 characters. Example: m

description   string  optional    

Auto-generated from validation rules for mission_vision_values.*.description. Must not be greater than 2000 characters. Example: Aut adipisci quidem nostrum qui commodi incidunt iure.

icon   string  optional    

Auto-generated from validation rules for mission_vision_values.*.icon. Must not be greater than 500 characters. Example: r

icon_image   file  optional    

Auto-generated from validation rules for mission_vision_values.*.icon_image. Must be an image. Must not be greater than 1024 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php37DA.tmp

*   object  optional    
icon_image   file  optional    

optional Icon image upload (stored in icon field). Example: C:\Users\AMITB\AppData\Local\Temp\php37DC.tmp

founder   string[]  optional    

optional Section 03 (Our Founder).

headline   string  optional    

optional Example: architecto

secondary_headline   string  optional    

optional Example: architecto

image   file  optional    

optional Example: C:\Users\AMITB\AppData\Local\Temp\php37DD.tmp

description   string  optional    

optional Example: Eius et animi quos velit et.

About Page (Public)

Public API for retrieving the About page content for the frontend. No authentication required.

Routes are prefixed with: /api/v1/about-page

Get about page

Returns Section 01 (About Us), Section 02 (Mission, Vision, Values), and Section 03 (Our Founder).

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/about-page" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/about-page"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "About page retrieved successfully",
    "data": {
        "section_01": {
            "headline": null,
            "about_us_image": null,
            "secondary_headline": null,
            "description": null
        },
        "section_02": {
            "mission_vision_values": [
                {
                    "id": 1,
                    "type": "mission",
                    "title": "Mission",
                    "description": null,
                    "icon": null
                },
                {
                    "id": 2,
                    "type": "vision",
                    "title": "Vision",
                    "description": null,
                    "icon": null
                },
                {
                    "id": 3,
                    "type": "values",
                    "title": "Values",
                    "description": null,
                    "icon": null
                }
            ]
        },
        "section_03": {
            "headline": null,
            "secondary_headline": null,
            "image": null,
            "description": null
        },
        "updated_at": "2026-05-14T16:55:35+00:00"
    }
}
 

Request      

GET api/v1/about-page

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Admin - Article Category Management

APIs for managing article categories. Only accessible by admin users. Admin sends is_active as text "true" or "false".

All routes are prefixed with: /api/v1/admin/article-category

Get list of article categories (with articles count)

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/article/article-category?page=1&per_page=15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/article/article-category"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/article/article-category

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

Create a new article category

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/article/article-category" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Fitness Tips\",
    \"is_active\": \"true\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/article/article-category"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Fitness Tips",
    "is_active": "true"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/article/article-category

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The category name. Example: Fitness Tips

is_active   string  optional    

optional "true" or "false". Default true. Example: true

Get a specific article category

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/article/article-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/article/article-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/article/article-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the article category. Example: 1

Update an article category

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/article/article-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"architecto\",
    \"is_active\": \"architecto\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/article/article-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "architecto",
    "is_active": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/article/article-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the article category. Example: 1

Body Parameters

name   string  optional    

optional The category name. Example: architecto

is_active   string  optional    

optional "true" or "false". Example: architecto

Update an article category

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/article/article-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"architecto\",
    \"is_active\": \"architecto\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/article/article-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "architecto",
    "is_active": "architecto"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/article/article-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the article category. Example: 1

Body Parameters

name   string  optional    

optional The category name. Example: architecto

is_active   string  optional    

optional "true" or "false". Example: architecto

Delete an article category

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/article/article-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/article/article-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/article/article-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the article category. Example: 1

Admin - Article Management

APIs for managing articles (with thumbnail, category, description, share options, sections). Admin sends share_facebook, share_twitter, share_linkedin as text "true" or "false". Section image_position: left, right, or center.

All routes are prefixed with: /api/v1/admin/article

Get list of articles

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/article/article?page=1&per_page=15&article_category_id=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/article/article"
);

const params = {
    "page": "1",
    "per_page": "15",
    "article_category_id": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/article/article

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

article_category_id   integer  optional    

optional Filter by category. Example: 1

Create a new article

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/article/article" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "article_category_id=1"\
    --form "name=How to Stay Fit"\
    --form "description=Eius et animi quos velit et."\
    --form "share_facebook=architecto"\
    --form "share_twitter=architecto"\
    --form "share_linkedin=architecto"\
    --form "sections[]=architecto"\
    --form "thumbnail_image=@C:\Users\AMITB\AppData\Local\Temp\php383E.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/article/article"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('article_category_id', '1');
body.append('name', 'How to Stay Fit');
body.append('description', 'Eius et animi quos velit et.');
body.append('share_facebook', 'architecto');
body.append('share_twitter', 'architecto');
body.append('share_linkedin', 'architecto');
body.append('sections[]', 'architecto');
body.append('thumbnail_image', document.querySelector('input[name="thumbnail_image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/admin/article/article

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

article_category_id   integer     

Article category ID. Example: 1

name   string     

Article name. Example: How to Stay Fit

thumbnail_image   file  optional    

optional Thumbnail image. Example: C:\Users\AMITB\AppData\Local\Temp\php383E.tmp

description   string  optional    

optional Article description. Example: Eius et animi quos velit et.

share_facebook   string  optional    

optional "true" or "false". Default true. Example: architecto

share_twitter   string  optional    

optional "true" or "false". Default true. Example: architecto

share_linkedin   string  optional    

optional "true" or "false". Default true. Example: architecto

sections   string[]  optional    

optional Array of sections. Each: image (file), image_position (left|right|center), heading, description, button, button_url, sort_order.

image   file  optional    

Auto-generated from validation rules for sections.*.image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php383D.tmp

image_position   string  optional    

Auto-generated from validation rules for sections.*.image_position. Example: left

Must be one of:
  • left
  • right
  • center
heading   string  optional    

Auto-generated from validation rules for sections.*.heading. Must not be greater than 500 characters. Example: v

description   string  optional    

Auto-generated from validation rules for sections.*.description. Example: Eius et animi quos velit et.

button   string  optional    

Auto-generated from validation rules for sections.*.button. Must not be greater than 255 characters. Example: v

button_url   string  optional    

Auto-generated from validation rules for sections.*.button_url. Must not be greater than 500 characters. Example: http://www.dach.com/mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html

sort_order   integer  optional    

Auto-generated from validation rules for sections.*.sort_order. Must be at least 0. Example: 38

Get a specific article

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/article/article/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/article/article/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/article/article/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the article. Example: 1

Update an article

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/article/article/1" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "article_category_id=16"\
    --form "name=architecto"\
    --form "description=Eius et animi quos velit et."\
    --form "share_facebook=architecto"\
    --form "share_twitter=architecto"\
    --form "share_linkedin=architecto"\
    --form "sections[]=architecto"\
    --form "thumbnail_image=@C:\Users\AMITB\AppData\Local\Temp\php3850.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/article/article/1"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('article_category_id', '16');
body.append('name', 'architecto');
body.append('description', 'Eius et animi quos velit et.');
body.append('share_facebook', 'architecto');
body.append('share_twitter', 'architecto');
body.append('share_linkedin', 'architecto');
body.append('sections[]', 'architecto');
body.append('thumbnail_image', document.querySelector('input[name="thumbnail_image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/admin/article/article/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the article. Example: 1

Body Parameters

article_category_id   integer  optional    

optional Article category ID. Example: 16

name   string  optional    

optional Article name. Example: architecto

thumbnail_image   file  optional    

optional Thumbnail image. Example: C:\Users\AMITB\AppData\Local\Temp\php3850.tmp

description   string  optional    

optional Article description. Example: Eius et animi quos velit et.

share_facebook   string  optional    

optional "true" or "false". Example: architecto

share_twitter   string  optional    

optional "true" or "false". Example: architecto

share_linkedin   string  optional    

optional "true" or "false". Example: architecto

sections   string[]  optional    

optional Full replacement of sections. Each: id (optional for existing), image (file), image_position, heading, description, button, button_url, sort_order.

id   integer  optional    

Auto-generated from validation rules for sections.*.id. The id of an existing record in the article_sections table. Example: 16

image   file  optional    

Auto-generated from validation rules for sections.*.image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php384F.tmp

image_position   string  optional    

Auto-generated from validation rules for sections.*.image_position. Example: center

Must be one of:
  • left
  • right
  • center
heading   string  optional    

Auto-generated from validation rules for sections.*.heading. Must not be greater than 500 characters. Example: n

description   string  optional    

Auto-generated from validation rules for sections.*.description. Example: Eius et animi quos velit et.

button   string  optional    

Auto-generated from validation rules for sections.*.button. Must not be greater than 255 characters. Example: v

button_url   string  optional    

Auto-generated from validation rules for sections.*.button_url. Must not be greater than 500 characters. Example: http://www.dach.com/mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html

sort_order   integer  optional    

Auto-generated from validation rules for sections.*.sort_order. Must be at least 0. Example: 38

Update an article

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/article/article/1" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "article_category_id=16"\
    --form "name=architecto"\
    --form "description=Eius et animi quos velit et."\
    --form "share_facebook=architecto"\
    --form "share_twitter=architecto"\
    --form "share_linkedin=architecto"\
    --form "sections[]=architecto"\
    --form "thumbnail_image=@C:\Users\AMITB\AppData\Local\Temp\php3863.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/article/article/1"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('article_category_id', '16');
body.append('name', 'architecto');
body.append('description', 'Eius et animi quos velit et.');
body.append('share_facebook', 'architecto');
body.append('share_twitter', 'architecto');
body.append('share_linkedin', 'architecto');
body.append('sections[]', 'architecto');
body.append('thumbnail_image', document.querySelector('input[name="thumbnail_image"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Request      

PUT api/v1/admin/article/article/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the article. Example: 1

Body Parameters

article_category_id   integer  optional    

optional Article category ID. Example: 16

name   string  optional    

optional Article name. Example: architecto

thumbnail_image   file  optional    

optional Thumbnail image. Example: C:\Users\AMITB\AppData\Local\Temp\php3863.tmp

description   string  optional    

optional Article description. Example: Eius et animi quos velit et.

share_facebook   string  optional    

optional "true" or "false". Example: architecto

share_twitter   string  optional    

optional "true" or "false". Example: architecto

share_linkedin   string  optional    

optional "true" or "false". Example: architecto

sections   string[]  optional    

optional Full replacement of sections. Each: id (optional for existing), image (file), image_position, heading, description, button, button_url, sort_order.

id   integer  optional    

Auto-generated from validation rules for sections.*.id. The id of an existing record in the article_sections table. Example: 16

image   file  optional    

Auto-generated from validation rules for sections.*.image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3862.tmp

image_position   string  optional    

Auto-generated from validation rules for sections.*.image_position. Example: center

Must be one of:
  • left
  • right
  • center
heading   string  optional    

Auto-generated from validation rules for sections.*.heading. Must not be greater than 500 characters. Example: n

description   string  optional    

Auto-generated from validation rules for sections.*.description. Example: Eius et animi quos velit et.

button   string  optional    

Auto-generated from validation rules for sections.*.button. Must not be greater than 255 characters. Example: v

button_url   string  optional    

Auto-generated from validation rules for sections.*.button_url. Must not be greater than 500 characters. Example: http://www.dach.com/mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html

sort_order   integer  optional    

Auto-generated from validation rules for sections.*.sort_order. Must be at least 0. Example: 38

Update an article

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/article/article/1" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "article_category_id=16"\
    --form "name=architecto"\
    --form "description=Eius et animi quos velit et."\
    --form "share_facebook=architecto"\
    --form "share_twitter=architecto"\
    --form "share_linkedin=architecto"\
    --form "sections[]=architecto"\
    --form "thumbnail_image=@C:\Users\AMITB\AppData\Local\Temp\php3866.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/article/article/1"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('article_category_id', '16');
body.append('name', 'architecto');
body.append('description', 'Eius et animi quos velit et.');
body.append('share_facebook', 'architecto');
body.append('share_twitter', 'architecto');
body.append('share_linkedin', 'architecto');
body.append('sections[]', 'architecto');
body.append('thumbnail_image', document.querySelector('input[name="thumbnail_image"]').files[0]);

fetch(url, {
    method: "PATCH",
    headers,
    body,
}).then(response => response.json());

Request      

PATCH api/v1/admin/article/article/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the article. Example: 1

Body Parameters

article_category_id   integer  optional    

optional Article category ID. Example: 16

name   string  optional    

optional Article name. Example: architecto

thumbnail_image   file  optional    

optional Thumbnail image. Example: C:\Users\AMITB\AppData\Local\Temp\php3866.tmp

description   string  optional    

optional Article description. Example: Eius et animi quos velit et.

share_facebook   string  optional    

optional "true" or "false". Example: architecto

share_twitter   string  optional    

optional "true" or "false". Example: architecto

share_linkedin   string  optional    

optional "true" or "false". Example: architecto

sections   string[]  optional    

optional Full replacement of sections. Each: id (optional for existing), image (file), image_position, heading, description, button, button_url, sort_order.

id   integer  optional    

Auto-generated from validation rules for sections.*.id. The id of an existing record in the article_sections table. Example: 16

image   file  optional    

Auto-generated from validation rules for sections.*.image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3865.tmp

image_position   string  optional    

Auto-generated from validation rules for sections.*.image_position. Example: right

Must be one of:
  • left
  • right
  • center
heading   string  optional    

Auto-generated from validation rules for sections.*.heading. Must not be greater than 500 characters. Example: n

description   string  optional    

Auto-generated from validation rules for sections.*.description. Example: Eius et animi quos velit et.

button   string  optional    

Auto-generated from validation rules for sections.*.button. Must not be greater than 255 characters. Example: v

button_url   string  optional    

Auto-generated from validation rules for sections.*.button_url. Must not be greater than 500 characters. Example: http://www.dach.com/mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html

sort_order   integer  optional    

Auto-generated from validation rules for sections.*.sort_order. Must be at least 0. Example: 38

Delete an article

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/article/article/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/article/article/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/article/article/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the article. Example: 1

Article Categories (Public)

Public APIs for listing article categories. No authentication required. Returns only active categories with articles count.

All routes are prefixed with: /api/v1/article-category

List active article categories (with articles count)

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/article/article-category?page=1&per_page=15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/article/article-category"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "Article categories retrieved successfully",
    "data": {
        "data": [],
        "links": {
            "first": "https://ruhline-api.test/api/v1/article/article-category?page=1",
            "last": "https://ruhline-api.test/api/v1/article/article-category?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": null,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "page": null,
                    "active": false
                },
                {
                    "url": "https://ruhline-api.test/api/v1/article/article-category?page=1",
                    "label": "1",
                    "page": 1,
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "page": null,
                    "active": false
                }
            ],
            "path": "https://ruhline-api.test/api/v1/article/article-category",
            "per_page": 15,
            "to": null,
            "total": 0
        }
    }
}
 

Request      

GET api/v1/article/article-category

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

Get a single active article category

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/article/article-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/article/article-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Article category not found."
}
 

Request      

GET api/v1/article/article-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the article category. Example: 1

Articles (Public)

Public APIs for listing and viewing articles. No authentication required. All routes are prefixed with: /api/v1/article/article (list, single by id).

List articles

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/article/article?page=1&per_page=15&article_category_id=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/article/article"
);

const params = {
    "page": "1",
    "per_page": "15",
    "article_category_id": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "Articles retrieved successfully",
    "data": {
        "data": [],
        "links": {
            "first": "https://ruhline-api.test/api/v1/article/article?page=1",
            "last": "https://ruhline-api.test/api/v1/article/article?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": null,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "page": null,
                    "active": false
                },
                {
                    "url": "https://ruhline-api.test/api/v1/article/article?page=1",
                    "label": "1",
                    "page": 1,
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "page": null,
                    "active": false
                }
            ],
            "path": "https://ruhline-api.test/api/v1/article/article",
            "per_page": 15,
            "to": null,
            "total": 0
        }
    }
}
 

Request      

GET api/v1/article/article

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

article_category_id   integer  optional    

optional Filter by category. Example: 1

Get a single article

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/article/article/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/article/article/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Article not found."
}
 

Request      

GET api/v1/article/article/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the article. Example: 1

Admin - Card Management

APIs for managing cards within card categories. Only accessible by admin users. Each category has up to 52 cards. Admin provides card name and description when creating.

All routes are prefixed with: /api/v1/admin/card-category/cards

Get list of cards

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/card-category/cards?page=1&per_page=15&card_category_id=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/card-category/cards"
);

const params = {
    "page": "1",
    "per_page": "15",
    "card_category_id": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/card-category/cards

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

card_category_id   integer  optional    

optional Filter by card category. Example: 1

Create a new card

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/card-category/cards" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"card_category_id\": 1,
    \"name\": \"The Fool\",
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/card-category/cards"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "card_category_id": 1,
    "name": "The Fool",
    "description": "Eius et animi quos velit et."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/card-category/cards

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

card_category_id   integer     

Card category ID. Example: 1

name   string     

Card name. Example: The Fool

description   string  optional    

optional Card description. Example: Eius et animi quos velit et.

Get a specific card

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/card-category/cards/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/card-category/cards/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/card-category/cards/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the card. Example: 1

Update a card

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/card-category/cards/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"card_category_id\": 16,
    \"name\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/card-category/cards/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "card_category_id": 16,
    "name": "architecto",
    "description": "Eius et animi quos velit et."
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/card-category/cards/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the card. Example: 1

Body Parameters

card_category_id   integer  optional    

optional Card category ID. Example: 16

name   string  optional    

optional Card name. Example: architecto

description   string  optional    

optional Card description. Example: Eius et animi quos velit et.

Update a card

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/card-category/cards/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"card_category_id\": 16,
    \"name\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/card-category/cards/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "card_category_id": 16,
    "name": "architecto",
    "description": "Eius et animi quos velit et."
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/card-category/cards/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the card. Example: 1

Body Parameters

card_category_id   integer  optional    

optional Card category ID. Example: 16

name   string  optional    

optional Card name. Example: architecto

description   string  optional    

optional Card description. Example: Eius et animi quos velit et.

Delete a card

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/card-category/cards/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/card-category/cards/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/card-category/cards/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the card. Example: 1

Admin - Card Category Management

APIs for managing card categories. Only accessible by admin users. Admin provides only the card category name when creating.

All routes are prefixed with: /api/v1/admin/card-category

Get list of card categories (with cards count)

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/card-category?page=1&per_page=15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/card-category"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/card-category

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

Create a new card category

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/card-category" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Tarot\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/card-category"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Tarot"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/card-category

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The card category name. Example: Tarot

Get a specific card category

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/card-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/card-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/card-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the card category. Example: 1

Update a card category

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/card-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"architecto\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/card-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/card-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the card category. Example: 1

Body Parameters

name   string  optional    

optional The card category name. Example: architecto

Update a card category

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/card-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"architecto\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/card-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "architecto"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/card-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the card category. Example: 1

Body Parameters

name   string  optional    

optional The card category name. Example: architecto

Delete a card category

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/card-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/card-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/card-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the card category. Example: 1

Admin - Coach Management

APIs for managing coaches. Only accessible by admin users.

All routes are prefixed with: /api/v1/coach/admin

Get list of all coaches

Retrieve a paginated list of all coaches with their profiles.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/coach?page=1&per_page=15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coach"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Coaches retrieved successfully",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 1,
                "user": {
                    "id": 1,
                    "first_name": "John",
                    "last_name": "Doe",
                    "email": "john@example.com"
                },
                "profile": {
                    "phone": "1234567890",
                    "gender": "male",
                    "coach_type": "Mentor",
                    "profile_image": "http://example.com/storage/coaches/profiles/image.jpg"
                }
            }
        ],
        "total": 10
    }
}
 

Request      

GET api/v1/admin/coach

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

Create a new coach

Create a new coach account with profile information. An email will be sent to the coach with their login credentials.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/coach" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "first_name=John"\
    --form "last_name=Doe"\
    --form "email=john@example.com"\
    --form "phone=1234567890"\
    --form "phone_country_code_id=1"\
    --form "gender=male"\
    --form "coach_type=Mentor"\
    --form "password=password123"\
    --form "notes=Experienced mentor with 10 years of experience."\
    --form "password_confirmation=password123"\
    --form "profile_image=@C:\Users\AMITB\AppData\Local\Temp\php39D2.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coach"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('first_name', 'John');
body.append('last_name', 'Doe');
body.append('email', 'john@example.com');
body.append('phone', '1234567890');
body.append('phone_country_code_id', '1');
body.append('gender', 'male');
body.append('coach_type', 'Mentor');
body.append('password', 'password123');
body.append('notes', 'Experienced mentor with 10 years of experience.');
body.append('password_confirmation', 'password123');
body.append('profile_image', document.querySelector('input[name="profile_image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (201):


{
    "success": true,
    "message": "Coach created successfully",
    "data": {
        "id": 1,
        "user": {
            "id": 1,
            "first_name": "John",
            "last_name": "Doe",
            "email": "john@example.com"
        },
        "profile": {
            "phone": "1234567890",
            "gender": "male",
            "coach_type": "Mentor",
            "profile_image": "http://example.com/storage/coaches/profiles/image.jpg"
        }
    }
}
 

Example response (422):


{
    "success": false,
    "message": "Validation error",
    "errors": {
        "email": [
            "The email has already been taken."
        ]
    }
}
 

Request      

POST api/v1/admin/coach

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

first_name   string     

The coach's first name. Example: John

last_name   string     

The coach's last name. Example: Doe

email   string     

The coach's email address. Example: john@example.com

phone   string     

The coach's phone number. Example: 1234567890

phone_country_code_id   integer     

The phone country code ID. Example: 1

gender   string     

The coach's gender (male, female, other). Example: male

coach_type   string     

The coach type (Mentor, Yoga Trainer). Example: Mentor

password   string     

The coach's password. Example: password123

notes   string  optional    

Optional notes about the coach. Example: Experienced mentor with 10 years of experience.

profile_image   file  optional    

optional The coach's profile image. Must be an image file (jpeg, png, jpg, gif) and not exceed 2MB. Example: C:\Users\AMITB\AppData\Local\Temp\php39D2.tmp

password_confirmation   string     

Password confirmation. Example: password123

Get a specific coach

Retrieve detailed information about a specific coach.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/coach/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coach/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Coach retrieved successfully",
    "data": {
        "id": 1,
        "user": {
            "id": 1,
            "first_name": "John",
            "last_name": "Doe",
            "email": "john@example.com"
        },
        "profile": {
            "phone": "1234567890",
            "gender": "male",
            "coach_type": "Mentor",
            "profile_image": "http://example.com/storage/coaches/profiles/image.jpg"
        }
    }
}
 

Example response (404):


{
    "success": false,
    "message": "Coach not found."
}
 

Request      

GET api/v1/admin/coach/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the coach. Example: 1

Update a coach

Update coach information and profile details.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/coach/1" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "first_name=John"\
    --form "last_name=Doe"\
    --form "email=john@example.com"\
    --form "phone=1234567890"\
    --form "phone_country_code_id=1"\
    --form "gender=male"\
    --form "coach_type=Mentor"\
    --form "notes=Experienced mentor with 10 years of experience."\
    --form "profile_image=@C:\Users\AMITB\AppData\Local\Temp\php39E3.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coach/1"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('first_name', 'John');
body.append('last_name', 'Doe');
body.append('email', 'john@example.com');
body.append('phone', '1234567890');
body.append('phone_country_code_id', '1');
body.append('gender', 'male');
body.append('coach_type', 'Mentor');
body.append('notes', 'Experienced mentor with 10 years of experience.');
body.append('profile_image', document.querySelector('input[name="profile_image"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Coach updated successfully",
    "data": {
        "id": 1,
        "user": {
            "id": 1,
            "first_name": "John",
            "last_name": "Doe",
            "email": "john@example.com"
        },
        "profile": {
            "phone": "1234567890",
            "gender": "male",
            "coach_type": "Mentor"
        }
    }
}
 

Example response (404):


{
    "success": false,
    "message": "Coach not found."
}
 

Request      

PUT api/v1/admin/coach/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the coach. Example: 1

Body Parameters

first_name   string  optional    

optional The coach's first name. Example: John

last_name   string  optional    

optional The coach's last name. Example: Doe

email   string  optional    

optional The coach's email address. Example: john@example.com

phone   string  optional    

optional The coach's phone number. Example: 1234567890

phone_country_code_id   integer  optional    

optional The phone country code ID. Example: 1

gender   string  optional    

optional The coach's gender (male, female, other). Example: male

coach_type   string  optional    

optional The coach type (Mentor, Yoga Trainer). Example: Mentor

notes   string  optional    

Optional notes about the coach. Example: Experienced mentor with 10 years of experience.

profile_image   file  optional    

optional The coach's profile image. Must be an image file (jpeg, png, jpg, gif) and not exceed 2MB. Example: C:\Users\AMITB\AppData\Local\Temp\php39E3.tmp

Update a coach

Update coach information and profile details.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/coach/1" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "first_name=John"\
    --form "last_name=Doe"\
    --form "email=john@example.com"\
    --form "phone=1234567890"\
    --form "phone_country_code_id=1"\
    --form "gender=male"\
    --form "coach_type=Mentor"\
    --form "notes=Experienced mentor with 10 years of experience."\
    --form "profile_image=@C:\Users\AMITB\AppData\Local\Temp\php39E4.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coach/1"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('first_name', 'John');
body.append('last_name', 'Doe');
body.append('email', 'john@example.com');
body.append('phone', '1234567890');
body.append('phone_country_code_id', '1');
body.append('gender', 'male');
body.append('coach_type', 'Mentor');
body.append('notes', 'Experienced mentor with 10 years of experience.');
body.append('profile_image', document.querySelector('input[name="profile_image"]').files[0]);

fetch(url, {
    method: "PATCH",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Coach updated successfully",
    "data": {
        "id": 1,
        "user": {
            "id": 1,
            "first_name": "John",
            "last_name": "Doe",
            "email": "john@example.com"
        },
        "profile": {
            "phone": "1234567890",
            "gender": "male",
            "coach_type": "Mentor"
        }
    }
}
 

Example response (404):


{
    "success": false,
    "message": "Coach not found."
}
 

Request      

PATCH api/v1/admin/coach/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the coach. Example: 1

Body Parameters

first_name   string  optional    

optional The coach's first name. Example: John

last_name   string  optional    

optional The coach's last name. Example: Doe

email   string  optional    

optional The coach's email address. Example: john@example.com

phone   string  optional    

optional The coach's phone number. Example: 1234567890

phone_country_code_id   integer  optional    

optional The phone country code ID. Example: 1

gender   string  optional    

optional The coach's gender (male, female, other). Example: male

coach_type   string  optional    

optional The coach type (Mentor, Yoga Trainer). Example: Mentor

notes   string  optional    

Optional notes about the coach. Example: Experienced mentor with 10 years of experience.

profile_image   file  optional    

optional The coach's profile image. Must be an image file (jpeg, png, jpg, gif) and not exceed 2MB. Example: C:\Users\AMITB\AppData\Local\Temp\php39E4.tmp

Verify a coach (admin approval)

Mark a coach as admin-verified so they can log into the coach portal.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/coach/1/verify" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coach/1/verify"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Coach verified successfully. They can now log in.",
    "data": []
}
 

Example response (404):


{
    "success": false,
    "message": "Coach not found."
}
 

Request      

POST api/v1/admin/coach/{id}/verify

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the coach. Example: 1

Delete a coach

Delete a coach account and all associated data. This will also delete the user account.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/coach/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coach/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Coach deleted successfully",
    "data": []
}
 

Example response (404):


{
    "success": false,
    "message": "Coach not found."
}
 

Request      

DELETE api/v1/admin/coach/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the coach. Example: 1

Admin - Global Commission Rate (Coaches)

APIs for managing the global commission rate applied to coaches. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/coach

Get global commission rate

Returns the current global commission rate (percentage) for coaches.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/coach/global-commission-rate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coach/global-commission-rate"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Global commission rate retrieved successfully",
    "data": {
        "global_commission_rate": 10.5
    }
}
 

Request      

GET api/v1/admin/coach/global-commission-rate

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Update global commission rate

Update the global commission rate (percentage) for all coaches. Value must be between 0 and 100.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/coach/global-commission-rate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"global_commission_rate\": 10.5
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coach/global-commission-rate"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "global_commission_rate": 10.5
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Global commission rate updated successfully",
    "data": {
        "global_commission_rate": 10.5
    }
}
 

Example response (422):


{"success":false,"message":"Validation failed","errors":{...}}
 

Request      

PUT api/v1/admin/coach/global-commission-rate

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

global_commission_rate   number     

The commission rate as a percentage (0-100). Example: 10.5

Update global commission rate

Update the global commission rate (percentage) for all coaches. Value must be between 0 and 100.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/coach/global-commission-rate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"global_commission_rate\": 10.5
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coach/global-commission-rate"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "global_commission_rate": 10.5
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Global commission rate updated successfully",
    "data": {
        "global_commission_rate": 10.5
    }
}
 

Example response (422):


{"success":false,"message":"Validation failed","errors":{...}}
 

Request      

PATCH api/v1/admin/coach/global-commission-rate

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

global_commission_rate   number     

The commission rate as a percentage (0-100). Example: 10.5

Admin - Contact Form Management

APIs for managing contact form submissions. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/contact

Get list of all contact submissions

Retrieve a paginated list of all contact form submissions.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/contact?page=1&per_page=15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/contact"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Contact submissions retrieved successfully",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 1,
                "name": "John Doe",
                "email": "john@example.com",
                "phone": "1234567890",
                "phone_country_code": {
                    "id": 1,
                    "phone_code": "+1",
                    "intl_dialing_prefix": "1"
                },
                "message": "I would like to know more about your services.",
                "created_at": "2026-01-28T06:05:31+00:00"
            }
        ],
        "total": 10
    }
}
 

Request      

GET api/v1/admin/contact

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

Get a specific contact submission

Retrieve detailed information about a specific contact submission.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/contact/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/contact/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Contact submission retrieved successfully",
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "john@example.com",
        "phone": "1234567890",
        "phone_country_code": {
            "id": 1,
            "phone_code": "+1",
            "intl_dialing_prefix": "1"
        },
        "message": "I would like to know more about your services.",
        "created_at": "2026-01-28T06:05:31+00:00"
    }
}
 

Example response (404):


{
    "success": false,
    "message": "Contact submission not found."
}
 

Request      

GET api/v1/admin/contact/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the contact submission. Example: 1

Delete a contact submission

Delete a contact form submission.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/contact/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/contact/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Contact submission deleted successfully",
    "data": []
}
 

Example response (404):


{
    "success": false,
    "message": "Contact submission not found."
}
 

Request      

DELETE api/v1/admin/contact/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the contact submission. Example: 1

Contact Form

Public APIs for submitting contact form. No authentication required.

Submit contact form

Submit a contact form with name, email, phone (with country code), and message.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/contact" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"John Doe\",
    \"email\": \"john@example.com\",
    \"phone\": \"1234567890\",
    \"phone_country_code_id\": 1,
    \"message\": \"I would like to know more about your services.\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/contact"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "1234567890",
    "phone_country_code_id": 1,
    "message": "I would like to know more about your services."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (201):


{
    "success": true,
    "message": "Contact form submitted successfully",
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "john@example.com",
        "phone": "1234567890",
        "phone_country_code": {
            "id": 1,
            "phone_code": "+1",
            "intl_dialing_prefix": "1"
        },
        "message": "I would like to know more about your services.",
        "created_at": "2026-01-28T06:05:31+00:00"
    }
}
 

Example response (422):


{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "email": [
            "The email field is required."
        ]
    }
}
 

Request      

POST api/v1/contact

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The contact's name. Example: John Doe

email   string     

The contact's email address. Example: john@example.com

phone   string     

The contact's phone number. Example: 1234567890

phone_country_code_id   integer     

The phone country code ID. Example: 1

message   string     

The contact's message. Example: I would like to know more about your services.

Admin - Contact Page (CMS)

APIs for managing the Contact page content. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/contact-page

Get contact page content (admin)

Returns the current contact page content for editing.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/contact-page" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/contact-page"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/contact-page

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Update contact page content

Update contact page content. All fields are optional; only provided fields are updated. Image field accepts file upload; text fields accept strings.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/contact-page" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "heading=Get in Touch"\
    --form "subheading=We'd love to hear from you."\
    --form "side_image=@C:\Users\AMITB\AppData\Local\Temp\php3A05.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/contact-page"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('heading', 'Get in Touch');
body.append('subheading', 'We'd love to hear from you.');
body.append('side_image', document.querySelector('input[name="side_image"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{"success":true,"message":"Contact page updated successfully","data":{...}}
 

Example response (422):


{"success":false,"message":"Validation failed","errors":{...}}
 

Request      

PUT api/v1/admin/contact-page

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

side_image   file  optional    

optional Side image (png, jpg, jpeg, gif, svg, webp). Example: C:\Users\AMITB\AppData\Local\Temp\php3A05.tmp

heading   string  optional    

optional Page heading. Example: Get in Touch

subheading   string  optional    

optional Page subheading. Example: We'd love to hear from you.

Update contact page content

Update contact page content. All fields are optional; only provided fields are updated. Image field accepts file upload; text fields accept strings.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/contact-page" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "heading=Get in Touch"\
    --form "subheading=We'd love to hear from you."\
    --form "side_image=@C:\Users\AMITB\AppData\Local\Temp\php3A17.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/contact-page"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('heading', 'Get in Touch');
body.append('subheading', 'We'd love to hear from you.');
body.append('side_image', document.querySelector('input[name="side_image"]').files[0]);

fetch(url, {
    method: "PATCH",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{"success":true,"message":"Contact page updated successfully","data":{...}}
 

Example response (422):


{"success":false,"message":"Validation failed","errors":{...}}
 

Request      

PATCH api/v1/admin/contact-page

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

side_image   file  optional    

optional Side image (png, jpg, jpeg, gif, svg, webp). Example: C:\Users\AMITB\AppData\Local\Temp\php3A17.tmp

heading   string  optional    

optional Page heading. Example: Get in Touch

subheading   string  optional    

optional Page subheading. Example: We'd love to hear from you.

Contact Page (Public)

Public APIs for retrieving the Contact page content. No authentication required.

Routes are prefixed with: /api/v1/contact-page

Get contact page content

Returns the current contact page content for the frontend (side image, heading, subheading).

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/contact-page" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/contact-page"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Contact page retrieved successfully",
    "data": {
        "id": 1,
        "side_image": "http://localhost/storage/contact-page/abc.jpg",
        "heading": "Get in Touch",
        "subheading": "We'd love to hear from you.",
        "updated_at": "2026-07-07T12:00:00+00:00"
    }
}
 

Example response (404):


{
    "success": false,
    "message": "Contact page not found."
}
 

Request      

GET api/v1/contact-page

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Admin - Coupon Management

APIs for managing coupons. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/coupon

Get list of all coupons

Retrieve a paginated list of all coupons.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/coupon?page=1&per_page=15&search=WELCOME" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coupon"
);

const params = {
    "page": "1",
    "per_page": "15",
    "search": "WELCOME",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/coupon

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

search   string  optional    

Optional search by code or name. Example: WELCOME

Create a new coupon

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/coupon" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"WELCOME10\",
    \"name\": \"Welcome Discount\",
    \"type\": \"percentage\",
    \"amount\": 10,
    \"usage_limit_per_user\": 3,
    \"applies_to_all\": true,
    \"is_active\": true,
    \"starts_at\": \"2026-02-01T00:00:00+00:00\",
    \"ends_at\": \"2026-02-28T23:59:59+00:00\",
    \"program_category_ids\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coupon"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "WELCOME10",
    "name": "Welcome Discount",
    "type": "percentage",
    "amount": 10,
    "usage_limit_per_user": 3,
    "applies_to_all": true,
    "is_active": true,
    "starts_at": "2026-02-01T00:00:00+00:00",
    "ends_at": "2026-02-28T23:59:59+00:00",
    "program_category_ids": [
        16
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/coupon

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

code   string     

Unique coupon code. Must not be greater than 50 characters. Example: WELCOME10

name   string     

Human readable coupon name. Must not be greater than 255 characters. Example: Welcome Discount

type   string     

Coupon type: fixed amount or percentage. Example: percentage

Must be one of:
  • fixed
  • percentage
amount   number     

Discount amount (value or percentage based on type). Must be at least 0.01. Example: 10

usage_limit_per_user   integer  optional    

Maximum times a single user can use this coupon. Null means unlimited per user. Must be at least 1. Example: 3

applies_to_all   boolean  optional    

Whether coupon applies to all program categories. Example: true

is_active   boolean  optional    

Whether the coupon is currently active. Example: true

starts_at   string  optional    

Optional start date/time from which the coupon is valid. Must be a valid date. Example: 2026-02-01T00:00:00+00:00

ends_at   string  optional    

Optional end date/time after which the coupon is no longer valid. Must be a valid date. Must be a date after or equal to starts_at. Example: 2026-02-28T23:59:59+00:00

program_category_ids   integer[]  optional    

The id of an existing record in the program_categories table.

Get a specific coupon

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/coupon/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coupon/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/coupon/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the coupon. Example: 1

Update a coupon

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/coupon/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"WELCOME10\",
    \"name\": \"Welcome Discount\",
    \"type\": \"percentage\",
    \"amount\": 10,
    \"usage_limit_per_user\": 3,
    \"applies_to_all\": true,
    \"is_active\": true,
    \"starts_at\": \"2026-02-01T00:00:00+00:00\",
    \"ends_at\": \"2026-02-28T23:59:59+00:00\",
    \"program_category_ids\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coupon/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "WELCOME10",
    "name": "Welcome Discount",
    "type": "percentage",
    "amount": 10,
    "usage_limit_per_user": 3,
    "applies_to_all": true,
    "is_active": true,
    "starts_at": "2026-02-01T00:00:00+00:00",
    "ends_at": "2026-02-28T23:59:59+00:00",
    "program_category_ids": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/coupon/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the coupon. Example: 1

Body Parameters

code   string  optional    

Unique coupon code. Must not be greater than 50 characters. Example: WELCOME10

name   string  optional    

Human readable coupon name. Must not be greater than 255 characters. Example: Welcome Discount

type   string  optional    

Coupon type: fixed amount or percentage. Example: percentage

Must be one of:
  • fixed
  • percentage
amount   number  optional    

Discount amount (value or percentage based on type). Must be at least 0.01. Example: 10

usage_limit_per_user   integer  optional    

Maximum times a single user can use this coupon. Null means unlimited per user. Must be at least 1. Example: 3

applies_to_all   boolean  optional    

Whether coupon applies to all program categories. Example: true

is_active   boolean  optional    

Whether the coupon is currently active. Example: true

starts_at   string  optional    

Optional start date/time from which the coupon is valid. Must be a valid date. Example: 2026-02-01T00:00:00+00:00

ends_at   string  optional    

Optional end date/time after which the coupon is no longer valid. Must be a valid date. Must be a date after or equal to starts_at. Example: 2026-02-28T23:59:59+00:00

program_category_ids   integer[]  optional    

The id of an existing record in the program_categories table.

Update a coupon

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/coupon/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"WELCOME10\",
    \"name\": \"Welcome Discount\",
    \"type\": \"percentage\",
    \"amount\": 10,
    \"usage_limit_per_user\": 3,
    \"applies_to_all\": true,
    \"is_active\": true,
    \"starts_at\": \"2026-02-01T00:00:00+00:00\",
    \"ends_at\": \"2026-02-28T23:59:59+00:00\",
    \"program_category_ids\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coupon/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "code": "WELCOME10",
    "name": "Welcome Discount",
    "type": "percentage",
    "amount": 10,
    "usage_limit_per_user": 3,
    "applies_to_all": true,
    "is_active": true,
    "starts_at": "2026-02-01T00:00:00+00:00",
    "ends_at": "2026-02-28T23:59:59+00:00",
    "program_category_ids": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/coupon/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the coupon. Example: 1

Body Parameters

code   string  optional    

Unique coupon code. Must not be greater than 50 characters. Example: WELCOME10

name   string  optional    

Human readable coupon name. Must not be greater than 255 characters. Example: Welcome Discount

type   string  optional    

Coupon type: fixed amount or percentage. Example: percentage

Must be one of:
  • fixed
  • percentage
amount   number  optional    

Discount amount (value or percentage based on type). Must be at least 0.01. Example: 10

usage_limit_per_user   integer  optional    

Maximum times a single user can use this coupon. Null means unlimited per user. Must be at least 1. Example: 3

applies_to_all   boolean  optional    

Whether coupon applies to all program categories. Example: true

is_active   boolean  optional    

Whether the coupon is currently active. Example: true

starts_at   string  optional    

Optional start date/time from which the coupon is valid. Must be a valid date. Example: 2026-02-01T00:00:00+00:00

ends_at   string  optional    

Optional end date/time after which the coupon is no longer valid. Must be a valid date. Must be a date after or equal to starts_at. Example: 2026-02-28T23:59:59+00:00

program_category_ids   integer[]  optional    

The id of an existing record in the program_categories table.

Delete a coupon

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/coupon/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/coupon/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/coupon/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the coupon. Example: 1

Admin - Customer Management

APIs for managing customers. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/customer

Get list of all customers

Retrieve a paginated list of all customers with their profiles.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/customer?page=1&per_page=15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/customer"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Customers retrieved successfully",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 1,
                "user": {
                    "id": 1,
                    "first_name": "John",
                    "last_name": "Doe",
                    "email": "john@example.com"
                },
                "profile": {
                    "phone": "1234567890",
                    "phone_country_code": {
                        "id": 1,
                        "phone_code": "+1",
                        "intl_dialing_prefix": "1"
                    }
                }
            }
        ],
        "total": 10
    }
}
 

Request      

GET api/v1/admin/customer

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

Create a new customer

Create a new customer account with profile information. An email will be sent to the customer with their login credentials. The customer's email is marked as verified by default because the account is created by an admin.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/customer" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"email\": \"john@example.com\",
    \"phone\": \"1234567890\",
    \"phone_country_code_id\": 1,
    \"password\": \"password123\",
    \"notes\": \"VIP customer with special requirements.\",
    \"address_line_1\": \"123 Main Street\",
    \"address_line_2\": \"Apt 4B\",
    \"landmark\": \"Near Central Park\",
    \"country_id\": 1,
    \"state_id\": 1,
    \"city_id\": 1,
    \"postal_code\": \"12345\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/customer"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "phone": "1234567890",
    "phone_country_code_id": 1,
    "password": "password123",
    "notes": "VIP customer with special requirements.",
    "address_line_1": "123 Main Street",
    "address_line_2": "Apt 4B",
    "landmark": "Near Central Park",
    "country_id": 1,
    "state_id": 1,
    "city_id": 1,
    "postal_code": "12345"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/customer

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

first_name   string     

The customer's first name. Must not be greater than 255 characters. Example: John

last_name   string     

The customer's last name. Must not be greater than 255 characters. Example: Doe

email   string     

The customer's email address. Must be a valid email address. Must not be greater than 255 characters. Example: john@example.com

phone   string     

The customer's phone number. Must not be greater than 20 characters. Example: 1234567890

phone_country_code_id   integer     

The phone country code ID. The id of an existing record in the phone_country_codes table. Example: 1

password   string     

The customer's password. Must be at least 8 characters. Example: password123

notes   string  optional    

Optional notes about the customer. Example: VIP customer with special requirements.

address_line_1   string  optional    

The customer's primary address line. Must not be greater than 255 characters. Example: 123 Main Street

address_line_2   string  optional    

The customer's secondary address line. Must not be greater than 255 characters. Example: Apt 4B

landmark   string  optional    

A nearby landmark. Must not be greater than 255 characters. Example: Near Central Park

country_id   string  optional    

The ID of the country. The id of an existing record in the countries table. Example: 1

state_id   string  optional    

The ID of the state. The id of an existing record in the states table. Example: 1

city_id   string  optional    

The ID of the city. The id of an existing record in the cities table. Example: 1

postal_code   string  optional    

The postal or zip code. Must not be greater than 20 characters. Example: 12345

profile_image   file  optional    

The customer's profile image. Must be an image file (jpeg, png, jpg, gif) and not exceed 2MB. Must be an image. Must not be greater than 2048 kilobytes.

Get a specific customer

Retrieve detailed information about a specific customer.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/customer/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/customer/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Customer retrieved successfully",
    "data": {
        "id": 1,
        "user": {
            "id": 1,
            "first_name": "John",
            "last_name": "Doe",
            "email": "john@example.com"
        },
        "profile": {
            "phone": "1234567890",
            "phone_country_code": {
                "id": 1,
                "phone_code": "+1",
                "intl_dialing_prefix": "1"
            }
        }
    }
}
 

Example response (404):


{
    "success": false,
    "message": "Customer not found."
}
 

Request      

GET api/v1/admin/customer/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 1

Update a customer

Update customer information and profile details.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/customer/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"email\": \"john@example.com\",
    \"phone\": \"1234567890\",
    \"phone_country_code_id\": 1,
    \"notes\": \"VIP customer with special requirements.\",
    \"address_line_1\": \"123 Main Street\",
    \"address_line_2\": \"Apt 4B\",
    \"landmark\": \"Near Central Park\",
    \"country_id\": 1,
    \"state_id\": 1,
    \"city_id\": 1,
    \"postal_code\": \"12345\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/customer/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "phone": "1234567890",
    "phone_country_code_id": 1,
    "notes": "VIP customer with special requirements.",
    "address_line_1": "123 Main Street",
    "address_line_2": "Apt 4B",
    "landmark": "Near Central Park",
    "country_id": 1,
    "state_id": 1,
    "city_id": 1,
    "postal_code": "12345"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/customer/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the customer. Example: architecto

Body Parameters

first_name   string  optional    

The customer's first name. Must not be greater than 255 characters. Example: John

last_name   string  optional    

The customer's last name. Must not be greater than 255 characters. Example: Doe

email   string  optional    

The customer's email address. Must be a valid email address. Must not be greater than 255 characters. Example: john@example.com

phone   string  optional    

The customer's phone number. Must not be greater than 20 characters. Example: 1234567890

phone_country_code_id   integer  optional    

The phone country code ID. The id of an existing record in the phone_country_codes table. Example: 1

notes   string  optional    

Optional notes about the customer. Example: VIP customer with special requirements.

address_line_1   string  optional    

The customer's primary address line. Must not be greater than 255 characters. Example: 123 Main Street

address_line_2   string  optional    

The customer's secondary address line. Must not be greater than 255 characters. Example: Apt 4B

landmark   string  optional    

A nearby landmark. Must not be greater than 255 characters. Example: Near Central Park

country_id   string  optional    

The ID of the country. The id of an existing record in the countries table. Example: 1

state_id   string  optional    

The ID of the state. The id of an existing record in the states table. Example: 1

city_id   string  optional    

The ID of the city. The id of an existing record in the cities table. Example: 1

postal_code   string  optional    

The postal or zip code. Must not be greater than 20 characters. Example: 12345

profile_image   file  optional    

The customer's profile image. Must be an image file (jpeg, png, jpg, gif) and not exceed 2MB. Must be an image. Must not be greater than 2048 kilobytes.

Update a customer

Update customer information and profile details.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/customer/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"first_name\": \"John\",
    \"last_name\": \"Doe\",
    \"email\": \"john@example.com\",
    \"phone\": \"1234567890\",
    \"phone_country_code_id\": 1,
    \"notes\": \"VIP customer with special requirements.\",
    \"address_line_1\": \"123 Main Street\",
    \"address_line_2\": \"Apt 4B\",
    \"landmark\": \"Near Central Park\",
    \"country_id\": 1,
    \"state_id\": 1,
    \"city_id\": 1,
    \"postal_code\": \"12345\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/customer/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com",
    "phone": "1234567890",
    "phone_country_code_id": 1,
    "notes": "VIP customer with special requirements.",
    "address_line_1": "123 Main Street",
    "address_line_2": "Apt 4B",
    "landmark": "Near Central Park",
    "country_id": 1,
    "state_id": 1,
    "city_id": 1,
    "postal_code": "12345"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/customer/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the customer. Example: architecto

Body Parameters

first_name   string  optional    

The customer's first name. Must not be greater than 255 characters. Example: John

last_name   string  optional    

The customer's last name. Must not be greater than 255 characters. Example: Doe

email   string  optional    

The customer's email address. Must be a valid email address. Must not be greater than 255 characters. Example: john@example.com

phone   string  optional    

The customer's phone number. Must not be greater than 20 characters. Example: 1234567890

phone_country_code_id   integer  optional    

The phone country code ID. The id of an existing record in the phone_country_codes table. Example: 1

notes   string  optional    

Optional notes about the customer. Example: VIP customer with special requirements.

address_line_1   string  optional    

The customer's primary address line. Must not be greater than 255 characters. Example: 123 Main Street

address_line_2   string  optional    

The customer's secondary address line. Must not be greater than 255 characters. Example: Apt 4B

landmark   string  optional    

A nearby landmark. Must not be greater than 255 characters. Example: Near Central Park

country_id   string  optional    

The ID of the country. The id of an existing record in the countries table. Example: 1

state_id   string  optional    

The ID of the state. The id of an existing record in the states table. Example: 1

city_id   string  optional    

The ID of the city. The id of an existing record in the cities table. Example: 1

postal_code   string  optional    

The postal or zip code. Must not be greater than 20 characters. Example: 12345

profile_image   file  optional    

The customer's profile image. Must be an image file (jpeg, png, jpg, gif) and not exceed 2MB. Must be an image. Must not be greater than 2048 kilobytes.

Delete a customer

Delete a customer account and all associated data. This will also delete the user account.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/customer/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/customer/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Customer deleted successfully",
    "data": []
}
 

Example response (404):


{
    "success": false,
    "message": "Customer not found."
}
 

Request      

DELETE api/v1/admin/customer/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the customer. Example: 1

Admin - Disputes

GET api/v1/admin/dispute

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/dispute" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/dispute"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/dispute

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/dispute/{id}

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/dispute/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/dispute/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/dispute/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the dispute. Example: architecto

PATCH api/v1/admin/dispute/{id}/status

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/dispute/architecto/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"closed\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/dispute/architecto/status"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "status": "closed"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/dispute/{id}/status

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the dispute. Example: architecto

Body Parameters

status   string     

Auto-generated from validation rules for status. Example: closed

Must be one of:
  • open
  • closed

Admin - FAQ Management

APIs for managing FAQs for mentee and mentor pages. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/faq

Get list of FAQs

Optionally filter by page_type (mentee|mentor) and is_active.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/faq?page_type=mentee&is_active=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/faq"
);

const params = {
    "page_type": "mentee",
    "is_active": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/faq

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page_type   string  optional    

optional Filter by page type. Example: mentee

is_active   boolean  optional    

optional Filter by active status. Example: true

Create a new FAQ

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/faq" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"page_type\": \"mentee\",
    \"heading\": \"What is a mentee?\",
    \"description\": \"A mentee is...\",
    \"is_active\": true,
    \"sort_order\": 1
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/faq"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "page_type": "mentee",
    "heading": "What is a mentee?",
    "description": "A mentee is...",
    "is_active": true,
    "sort_order": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/faq

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

page_type   string     

Page type. Allowed: mentee, mentor. Example: mentee

heading   string     

FAQ heading. Example: What is a mentee?

description   string     

FAQ description. Example: A mentee is...

is_active   boolean  optional    

optional Whether the FAQ is active. Default true. Example: true

sort_order   integer  optional    

optional Sort order within the page. Example: 1

Get a specific FAQ

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/faq/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/faq/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/faq/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the FAQ. Example: 1

Update an existing FAQ

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/faq/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"page_type\": \"mentor\",
    \"heading\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\",
    \"is_active\": false,
    \"sort_order\": 16
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/faq/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "page_type": "mentor",
    "heading": "architecto",
    "description": "Eius et animi quos velit et.",
    "is_active": false,
    "sort_order": 16
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/faq/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the FAQ. Example: 1

Body Parameters

page_type   string  optional    

optional Page type. Allowed: mentee, mentor. Example: mentor

heading   string  optional    

optional FAQ heading. Example: architecto

description   string  optional    

optional FAQ description. Example: Eius et animi quos velit et.

is_active   boolean  optional    

optional Whether the FAQ is active. Example: false

sort_order   integer  optional    

optional Sort order within the page. Example: 16

Update an existing FAQ

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/faq/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"page_type\": \"mentor\",
    \"heading\": \"architecto\",
    \"description\": \"Eius et animi quos velit et.\",
    \"is_active\": false,
    \"sort_order\": 16
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/faq/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "page_type": "mentor",
    "heading": "architecto",
    "description": "Eius et animi quos velit et.",
    "is_active": false,
    "sort_order": 16
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/faq/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the FAQ. Example: 1

Body Parameters

page_type   string  optional    

optional Page type. Allowed: mentee, mentor. Example: mentor

heading   string  optional    

optional FAQ heading. Example: architecto

description   string  optional    

optional FAQ description. Example: Eius et animi quos velit et.

is_active   boolean  optional    

optional Whether the FAQ is active. Example: false

sort_order   integer  optional    

optional Sort order within the page. Example: 16

Delete an FAQ

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/faq/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/faq/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/faq/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the FAQ. Example: 1

FAQ (Public)

Public APIs for retrieving FAQs for mentee and mentor pages. No authentication required.

Routes are prefixed with: /api/v1/faq

Get FAQs for a given page type

Returns all active FAQs for the specified page (mentee or mentor), ordered by sort_order and id.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/faq/mentee" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/faq/mentee"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "FAQs retrieved successfully",
    "data": []
}
 

Request      

GET api/v1/faq/{page_type}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

page_type   string     

The page type. Allowed: mentee, mentor. Example: mentee

Admin - Goal Type Management

APIs for managing goal types. Admin enters only the Goal Type Name. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/goal-type

Get list of all goal types

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/goal-type?page=1&per_page=15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/goal-type"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/goal-type

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

Create a new goal type

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/goal-type" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Fitness\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/goal-type"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Fitness"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/goal-type

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The goal type name. Example: Fitness

Get a specific goal type

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/goal-type/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/goal-type/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/goal-type/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the goal type. Example: 1

Update a goal type

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/goal-type/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Fitness\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/goal-type/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Fitness"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/goal-type/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the goal type. Example: 1

Body Parameters

name   string     

The goal type name. Example: Fitness

Update a goal type

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/goal-type/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Fitness\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/goal-type/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Fitness"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/goal-type/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the goal type. Example: 1

Body Parameters

name   string     

The goal type name. Example: Fitness

Delete a goal type

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/goal-type/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/goal-type/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/goal-type/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the goal type. Example: 1

Admin - Habit Type Management

APIs for managing habit types. Admin enters only the Habit Type Name. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/habit-type

Get list of all habit types

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/habit-type?page=1&per_page=15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/habit-type"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/habit-type

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

Create a new habit type

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/habit-type" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Daily Exercise\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/habit-type"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Daily Exercise"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/habit-type

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The habit type name. Example: Daily Exercise

Get a specific habit type

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/habit-type/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/habit-type/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/habit-type/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the habit type. Example: 1

Update a habit type

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/habit-type/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Daily Exercise\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/habit-type/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Daily Exercise"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/habit-type/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the habit type. Example: 1

Body Parameters

name   string     

The habit type name. Example: Daily Exercise

Update a habit type

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/habit-type/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Daily Exercise\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/habit-type/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Daily Exercise"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/habit-type/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the habit type. Example: 1

Body Parameters

name   string     

The habit type name. Example: Daily Exercise

Delete a habit type

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/habit-type/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/habit-type/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/habit-type/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the habit type. Example: 1

Admin - Home Page (CMS)

APIs for managing the Home page content (Hero, About Us, Programs, Why Choose Us, Coaches, Articles). Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/home-page

Get home page data (admin)

Returns the full home page content for editing.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/home-page" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/home-page"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/home-page

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Update home page

Update any section. All sections are optional. Use multipart/form-data for image uploads.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/home-page" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "section_01[hero_headline]=b"\
    --form "section_01[hero_description]=n"\
    --form "section_02[headline]=g"\
    --form "section_02[secondary_headline]=z"\
    --form "section_02[description]=Velit et fugiat sunt nihil accusantium."\
    --form "section_02[button_name]=n"\
    --form "section_02[button_url]=https://www.runte.com/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci"\
    --form "section_03[headline]=p"\
    --form "section_03[secondary_headline]=w"\
    --form "section_04[headline]=l"\
    --form "section_04[secondary_headline]=v"\
    --form "section_04[options][][id]=16"\
    --form "section_04[options][][title]=n"\
    --form "section_04[options][][description]=Animi quos velit et fugiat."\
    --form "section_04[options][][sort_order]=42"\
    --form "section_05[headline]=q"\
    --form "section_05[secondary_headline]=w"\
    --form "section_06[headline]=r"\
    --form "section_06[secondary_headline]=s"\
    --form "section_01[hero_section_image]=@C:\Users\AMITB\AppData\Local\Temp\php3B56.tmp" \
    --form "section_02[about_us_section_image]=@C:\Users\AMITB\AppData\Local\Temp\php3B57.tmp" \
    --form "section_04[why_choose_us_section_image]=@C:\Users\AMITB\AppData\Local\Temp\php3B58.tmp"     --form "section_04[background_image]=@C:\Users\AMITB\AppData\Local\Temp\php3B59.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/home-page"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('section_01[hero_headline]', 'b');
body.append('section_01[hero_description]', 'n');
body.append('section_02[headline]', 'g');
body.append('section_02[secondary_headline]', 'z');
body.append('section_02[description]', 'Velit et fugiat sunt nihil accusantium.');
body.append('section_02[button_name]', 'n');
body.append('section_02[button_url]', 'https://www.runte.com/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci');
body.append('section_03[headline]', 'p');
body.append('section_03[secondary_headline]', 'w');
body.append('section_04[headline]', 'l');
body.append('section_04[secondary_headline]', 'v');
body.append('section_04[options][][id]', '16');
body.append('section_04[options][][title]', 'n');
body.append('section_04[options][][description]', 'Animi quos velit et fugiat.');
body.append('section_04[options][][sort_order]', '42');
body.append('section_05[headline]', 'q');
body.append('section_05[secondary_headline]', 'w');
body.append('section_06[headline]', 'r');
body.append('section_06[secondary_headline]', 's');
body.append('section_01[hero_section_image]', document.querySelector('input[name="section_01[hero_section_image]"]').files[0]);
body.append('section_02[about_us_section_image]', document.querySelector('input[name="section_02[about_us_section_image]"]').files[0]);
body.append('section_04[why_choose_us_section_image]', document.querySelector('input[name="section_04[why_choose_us_section_image]"]').files[0]);
body.append('section_04[background_image]', document.querySelector('input[name="section_04[background_image]"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Request      

PUT api/v1/admin/home-page

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

section_01   object  optional    

Auto-generated from validation rules for section_01.

hero_headline   string  optional    

Auto-generated from validation rules for section_01.hero_headline. Must not be greater than 255 characters. Example: b

hero_section_image   file  optional    

Auto-generated from validation rules for section_01.hero_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3B56.tmp

hero_description   string  optional    

Auto-generated from validation rules for section_01.hero_description. Must not be greater than 5000 characters. Example: n

section_02   object  optional    

Auto-generated from validation rules for section_02.

headline   string  optional    

Auto-generated from validation rules for section_02.headline. Must not be greater than 255 characters. Example: g

about_us_section_image   file  optional    

Auto-generated from validation rules for section_02.about_us_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3B57.tmp

secondary_headline   string  optional    

Auto-generated from validation rules for section_02.secondary_headline. Must not be greater than 255 characters. Example: z

description   string  optional    

Auto-generated from validation rules for section_02.description. Must not be greater than 10000 characters. Example: Velit et fugiat sunt nihil accusantium.

button_name   string  optional    

Auto-generated from validation rules for section_02.button_name. Must not be greater than 100 characters. Example: n

button_url   string  optional    

Auto-generated from validation rules for section_02.button_url. Must be a valid URL. Must not be greater than 500 characters. Example: https://www.runte.com/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci

section_03   object  optional    

Auto-generated from validation rules for section_03.

headline   string  optional    

Auto-generated from validation rules for section_03.headline. Must not be greater than 255 characters. Example: p

secondary_headline   string  optional    

Auto-generated from validation rules for section_03.secondary_headline. Must not be greater than 255 characters. Example: w

section_04   object  optional    

Auto-generated from validation rules for section_04.

headline   string  optional    

Auto-generated from validation rules for section_04.headline. Must not be greater than 255 characters. Example: l

secondary_headline   string  optional    

Auto-generated from validation rules for section_04.secondary_headline. Must not be greater than 255 characters. Example: v

why_choose_us_section_image   file  optional    

Auto-generated from validation rules for section_04.why_choose_us_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3B58.tmp

background_image   file  optional    

Auto-generated from validation rules for section_04.background_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3B59.tmp

options   object[]  optional    

Auto-generated from validation rules for section_04.options.

id   integer  optional    

Auto-generated from validation rules for section_04.options.*.id. The id of an existing record in the home_why_choose_us_options table. Example: 16

title   string  optional    

Auto-generated from validation rules for section_04.options.*.title. Must not be greater than 255 characters. Example: n

description   string  optional    

Auto-generated from validation rules for section_04.options.*.description. Must not be greater than 2000 characters. Example: Animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for section_04.options.*.sort_order. Must be at least 0. Example: 42

section_05   object  optional    

Auto-generated from validation rules for section_05.

headline   string  optional    

Auto-generated from validation rules for section_05.headline. Must not be greater than 255 characters. Example: q

secondary_headline   string  optional    

Auto-generated from validation rules for section_05.secondary_headline. Must not be greater than 255 characters. Example: w

section_06   object  optional    

Auto-generated from validation rules for section_06.

headline   string  optional    

Auto-generated from validation rules for section_06.headline. Must not be greater than 255 characters. Example: r

secondary_headline   string  optional    

Auto-generated from validation rules for section_06.secondary_headline. Must not be greater than 255 characters. Example: s

Update home page

Update any section. All sections are optional. Use multipart/form-data for image uploads.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/home-page" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "section_01[hero_headline]=b"\
    --form "section_01[hero_description]=n"\
    --form "section_02[headline]=g"\
    --form "section_02[secondary_headline]=z"\
    --form "section_02[description]=Velit et fugiat sunt nihil accusantium."\
    --form "section_02[button_name]=n"\
    --form "section_02[button_url]=https://www.runte.com/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci"\
    --form "section_03[headline]=p"\
    --form "section_03[secondary_headline]=w"\
    --form "section_04[headline]=l"\
    --form "section_04[secondary_headline]=v"\
    --form "section_04[options][][id]=16"\
    --form "section_04[options][][title]=n"\
    --form "section_04[options][][description]=Animi quos velit et fugiat."\
    --form "section_04[options][][sort_order]=42"\
    --form "section_05[headline]=q"\
    --form "section_05[secondary_headline]=w"\
    --form "section_06[headline]=r"\
    --form "section_06[secondary_headline]=s"\
    --form "section_01[hero_section_image]=@C:\Users\AMITB\AppData\Local\Temp\php3B6A.tmp" \
    --form "section_02[about_us_section_image]=@C:\Users\AMITB\AppData\Local\Temp\php3B6B.tmp" \
    --form "section_04[why_choose_us_section_image]=@C:\Users\AMITB\AppData\Local\Temp\php3B6C.tmp"     --form "section_04[background_image]=@C:\Users\AMITB\AppData\Local\Temp\php3B6D.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/home-page"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('section_01[hero_headline]', 'b');
body.append('section_01[hero_description]', 'n');
body.append('section_02[headline]', 'g');
body.append('section_02[secondary_headline]', 'z');
body.append('section_02[description]', 'Velit et fugiat sunt nihil accusantium.');
body.append('section_02[button_name]', 'n');
body.append('section_02[button_url]', 'https://www.runte.com/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci');
body.append('section_03[headline]', 'p');
body.append('section_03[secondary_headline]', 'w');
body.append('section_04[headline]', 'l');
body.append('section_04[secondary_headline]', 'v');
body.append('section_04[options][][id]', '16');
body.append('section_04[options][][title]', 'n');
body.append('section_04[options][][description]', 'Animi quos velit et fugiat.');
body.append('section_04[options][][sort_order]', '42');
body.append('section_05[headline]', 'q');
body.append('section_05[secondary_headline]', 'w');
body.append('section_06[headline]', 'r');
body.append('section_06[secondary_headline]', 's');
body.append('section_01[hero_section_image]', document.querySelector('input[name="section_01[hero_section_image]"]').files[0]);
body.append('section_02[about_us_section_image]', document.querySelector('input[name="section_02[about_us_section_image]"]').files[0]);
body.append('section_04[why_choose_us_section_image]', document.querySelector('input[name="section_04[why_choose_us_section_image]"]').files[0]);
body.append('section_04[background_image]', document.querySelector('input[name="section_04[background_image]"]').files[0]);

fetch(url, {
    method: "PATCH",
    headers,
    body,
}).then(response => response.json());

Request      

PATCH api/v1/admin/home-page

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

section_01   object  optional    

Auto-generated from validation rules for section_01.

hero_headline   string  optional    

Auto-generated from validation rules for section_01.hero_headline. Must not be greater than 255 characters. Example: b

hero_section_image   file  optional    

Auto-generated from validation rules for section_01.hero_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3B6A.tmp

hero_description   string  optional    

Auto-generated from validation rules for section_01.hero_description. Must not be greater than 5000 characters. Example: n

section_02   object  optional    

Auto-generated from validation rules for section_02.

headline   string  optional    

Auto-generated from validation rules for section_02.headline. Must not be greater than 255 characters. Example: g

about_us_section_image   file  optional    

Auto-generated from validation rules for section_02.about_us_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3B6B.tmp

secondary_headline   string  optional    

Auto-generated from validation rules for section_02.secondary_headline. Must not be greater than 255 characters. Example: z

description   string  optional    

Auto-generated from validation rules for section_02.description. Must not be greater than 10000 characters. Example: Velit et fugiat sunt nihil accusantium.

button_name   string  optional    

Auto-generated from validation rules for section_02.button_name. Must not be greater than 100 characters. Example: n

button_url   string  optional    

Auto-generated from validation rules for section_02.button_url. Must be a valid URL. Must not be greater than 500 characters. Example: https://www.runte.com/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci

section_03   object  optional    

Auto-generated from validation rules for section_03.

headline   string  optional    

Auto-generated from validation rules for section_03.headline. Must not be greater than 255 characters. Example: p

secondary_headline   string  optional    

Auto-generated from validation rules for section_03.secondary_headline. Must not be greater than 255 characters. Example: w

section_04   object  optional    

Auto-generated from validation rules for section_04.

headline   string  optional    

Auto-generated from validation rules for section_04.headline. Must not be greater than 255 characters. Example: l

secondary_headline   string  optional    

Auto-generated from validation rules for section_04.secondary_headline. Must not be greater than 255 characters. Example: v

why_choose_us_section_image   file  optional    

Auto-generated from validation rules for section_04.why_choose_us_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3B6C.tmp

background_image   file  optional    

Auto-generated from validation rules for section_04.background_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3B6D.tmp

options   object[]  optional    

Auto-generated from validation rules for section_04.options.

id   integer  optional    

Auto-generated from validation rules for section_04.options.*.id. The id of an existing record in the home_why_choose_us_options table. Example: 16

title   string  optional    

Auto-generated from validation rules for section_04.options.*.title. Must not be greater than 255 characters. Example: n

description   string  optional    

Auto-generated from validation rules for section_04.options.*.description. Must not be greater than 2000 characters. Example: Animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for section_04.options.*.sort_order. Must be at least 0. Example: 42

section_05   object  optional    

Auto-generated from validation rules for section_05.

headline   string  optional    

Auto-generated from validation rules for section_05.headline. Must not be greater than 255 characters. Example: q

secondary_headline   string  optional    

Auto-generated from validation rules for section_05.secondary_headline. Must not be greater than 255 characters. Example: w

section_06   object  optional    

Auto-generated from validation rules for section_06.

headline   string  optional    

Auto-generated from validation rules for section_06.headline. Must not be greater than 255 characters. Example: r

secondary_headline   string  optional    

Auto-generated from validation rules for section_06.secondary_headline. Must not be greater than 255 characters. Example: s

Home Page (Public)

Public API for retrieving the Home page content for the frontend. No authentication required.

Routes are prefixed with: /api/v1/home-page

Get home page

Returns all home page sections: Hero, About Us, Programs, Why Choose Us, Coaches, Articles.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/home-page" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/home-page"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Home page not found."
}
 

Request      

GET api/v1/home-page

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Admin - Values Intermediate Page (Intermediate Steps)

APIs for managing the Values Intermediate Page content (headline and points). Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/intermediate-steps/values

Get Values Intermediate Page content (admin)

Returns the headline and all points for editing.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/intermediate-steps/values" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/values"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/intermediate-steps/values

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Update Values Intermediate Page

Update headline and/or points. Send full points array to replace; existing points can be updated by id, new points without id will be created.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/values" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"architecto\",
    \"points\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/values"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "architecto",
    "points": [
        "architecto"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/intermediate-steps/values

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

headline   string     

Page headline. Example: architecto

points   string[]  optional    

optional Array of points (description, sort_order). Include id to update existing. Order = display order.

id   integer  optional    

Auto-generated from validation rules for points.*.id. The id of an existing record in the values_intermediate_points table. Example: 16

description   string  optional    

Auto-generated from validation rules for points.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for points.*.sort_order. Must be at least 0. Example: 42

Update Values Intermediate Page

Update headline and/or points. Send full points array to replace; existing points can be updated by id, new points without id will be created.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/values" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"architecto\",
    \"points\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/values"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "architecto",
    "points": [
        "architecto"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/intermediate-steps/values

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

headline   string     

Page headline. Example: architecto

points   string[]  optional    

optional Array of points (description, sort_order). Include id to update existing. Order = display order.

id   integer  optional    

Auto-generated from validation rules for points.*.id. The id of an existing record in the values_intermediate_points table. Example: 16

description   string  optional    

Auto-generated from validation rules for points.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for points.*.sort_order. Must be at least 0. Example: 42

Admin - The Y Method Page (Intermediate Steps)

APIs for managing The Y Method Page content (headline and steps). Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/intermediate-steps/y-method

Get The Y Method Page content (admin)

Returns the headline and all steps for editing.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/intermediate-steps/y-method" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/y-method"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/intermediate-steps/y-method

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Update The Y Method Page

Update headline and/or steps. Send full steps array to replace; existing steps can be updated by id, new steps without id will be created.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/y-method" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"architecto\",
    \"steps\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/y-method"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "architecto",
    "steps": [
        "architecto"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/intermediate-steps/y-method

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

headline   string     

Page headline. Example: architecto

steps   string[]  optional    

optional Array of steps (description, sort_order). Include id to update existing. Order = display order.

id   integer  optional    

Auto-generated from validation rules for steps.*.id. The id of an existing record in the y_method_steps table. Example: 16

description   string  optional    

Auto-generated from validation rules for steps.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for steps.*.sort_order. Must be at least 0. Example: 42

Update The Y Method Page

Update headline and/or steps. Send full steps array to replace; existing steps can be updated by id, new steps without id will be created.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/y-method" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"architecto\",
    \"steps\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/y-method"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "architecto",
    "steps": [
        "architecto"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/intermediate-steps/y-method

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

headline   string     

Page headline. Example: architecto

steps   string[]  optional    

optional Array of steps (description, sort_order). Include id to update existing. Order = display order.

id   integer  optional    

Auto-generated from validation rules for steps.*.id. The id of an existing record in the y_method_steps table. Example: 16

description   string  optional    

Auto-generated from validation rules for steps.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for steps.*.sort_order. Must be at least 0. Example: 42

Admin - Eight most common mistakes Intermediate Page

APIs for managing the Eight most common mistakes page (headline and mistakes). Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/intermediate-steps/eight-most-common-mistakes

Get Eight most common mistakes page content (admin)

Returns the headline and all mistakes for editing.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/intermediate-steps/eight-most-common-mistakes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/eight-most-common-mistakes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/intermediate-steps/eight-most-common-mistakes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Update Eight most common mistakes page

Update headline and/or mistakes. Send full mistakes array to replace; existing items can be updated by id, new items without id will be created.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/eight-most-common-mistakes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"architecto\",
    \"mistakes\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/eight-most-common-mistakes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "architecto",
    "mistakes": [
        "architecto"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/intermediate-steps/eight-most-common-mistakes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

headline   string     

Page headline. Example: architecto

mistakes   string[]  optional    

optional Array of mistakes (description, sort_order). Include id to update existing.

id   integer  optional    

Auto-generated from validation rules for mistakes.*.id. The id of an existing record in the eight_common_mistakes table. Example: 16

description   string  optional    

Auto-generated from validation rules for mistakes.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for mistakes.*.sort_order. Must be at least 0. Example: 42

Update Eight most common mistakes page

Update headline and/or mistakes. Send full mistakes array to replace; existing items can be updated by id, new items without id will be created.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/eight-most-common-mistakes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"architecto\",
    \"mistakes\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/eight-most-common-mistakes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "architecto",
    "mistakes": [
        "architecto"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/intermediate-steps/eight-most-common-mistakes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

headline   string     

Page headline. Example: architecto

mistakes   string[]  optional    

optional Array of mistakes (description, sort_order). Include id to update existing.

id   integer  optional    

Auto-generated from validation rules for mistakes.*.id. The id of an existing record in the eight_common_mistakes table. Example: 16

description   string  optional    

Auto-generated from validation rules for mistakes.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for mistakes.*.sort_order. Must be at least 0. Example: 42

Admin - Goal Settings Intermediate Page

APIs for managing the Goal Settings Intermediate Page (headline, quote, sub-headings, description 2, options). Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/intermediate-steps/goal-settings

Get Goal Settings Intermediate Page content (admin)

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/intermediate-steps/goal-settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/goal-settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/intermediate-steps/goal-settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Update Goal Settings Intermediate Page

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/goal-settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"architecto\",
    \"quote\": \"architecto\",
    \"sub_heading_1\": \"architecto\",
    \"sub_heading_2\": \"architecto\",
    \"description_2\": \"architecto\",
    \"options\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/goal-settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "architecto",
    "quote": "architecto",
    "sub_heading_1": "architecto",
    "sub_heading_2": "architecto",
    "description_2": "architecto",
    "options": [
        "architecto"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/intermediate-steps/goal-settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

headline   string     

Page headline. Example: architecto

quote   string  optional    

optional Quote. Example: architecto

sub_heading_1   string  optional    

optional Sub-heading 1. Example: architecto

sub_heading_2   string  optional    

optional Sub-heading 2. Example: architecto

description_2   string  optional    

optional Description 2 (long text). Example: architecto

options   string[]  optional    

optional Array of options (description, sort_order). Include id to update existing.

id   integer  optional    

Auto-generated from validation rules for options.*.id. The id of an existing record in the goal_settings_intermediate_options table. Example: 16

description   string  optional    

Auto-generated from validation rules for options.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for options.*.sort_order. Must be at least 0. Example: 42

Update Goal Settings Intermediate Page

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/goal-settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"architecto\",
    \"quote\": \"architecto\",
    \"sub_heading_1\": \"architecto\",
    \"sub_heading_2\": \"architecto\",
    \"description_2\": \"architecto\",
    \"options\": [
        \"architecto\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/goal-settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "architecto",
    "quote": "architecto",
    "sub_heading_1": "architecto",
    "sub_heading_2": "architecto",
    "description_2": "architecto",
    "options": [
        "architecto"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/intermediate-steps/goal-settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

headline   string     

Page headline. Example: architecto

quote   string  optional    

optional Quote. Example: architecto

sub_heading_1   string  optional    

optional Sub-heading 1. Example: architecto

sub_heading_2   string  optional    

optional Sub-heading 2. Example: architecto

description_2   string  optional    

optional Description 2 (long text). Example: architecto

options   string[]  optional    

optional Array of options (description, sort_order). Include id to update existing.

id   integer  optional    

Auto-generated from validation rules for options.*.id. The id of an existing record in the goal_settings_intermediate_options table. Example: 16

description   string  optional    

Auto-generated from validation rules for options.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for options.*.sort_order. Must be at least 0. Example: 42

Admin - Questions for each goal - why? Intermediate Page

APIs for managing the Questions for each goal - why? page (headlines, question blocks, quote). Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/intermediate-steps/questions-goal-why

Get Questions for each goal - why? page content (admin)

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/intermediate-steps/questions-goal-why" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/questions-goal-why"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/intermediate-steps/questions-goal-why

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Update Questions for each goal - why? page

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/questions-goal-why" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline_1\": \"b\",
    \"headline_2\": \"n\",
    \"headline_3\": \"g\",
    \"headline_4\": \"z\",
    \"headline_5\": \"m\",
    \"question_heading_1\": \"i\",
    \"question_description_1\": \"y\",
    \"question_heading_2\": \"v\",
    \"question_description_2\": \"d\",
    \"question_heading_3\": \"l\",
    \"question_description_3\": \"j\",
    \"quote\": \"n\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/questions-goal-why"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline_1": "b",
    "headline_2": "n",
    "headline_3": "g",
    "headline_4": "z",
    "headline_5": "m",
    "question_heading_1": "i",
    "question_description_1": "y",
    "question_heading_2": "v",
    "question_description_2": "d",
    "question_heading_3": "l",
    "question_description_3": "j",
    "quote": "n"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/intermediate-steps/questions-goal-why

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

headline_1   string  optional    

Auto-generated from validation rules for headline_1. Must not be greater than 255 characters. Example: b

headline_2   string  optional    

Auto-generated from validation rules for headline_2. Must not be greater than 255 characters. Example: n

headline_3   string  optional    

Auto-generated from validation rules for headline_3. Must not be greater than 255 characters. Example: g

headline_4   string  optional    

Auto-generated from validation rules for headline_4. Must not be greater than 255 characters. Example: z

headline_5   string  optional    

Auto-generated from validation rules for headline_5. Must not be greater than 255 characters. Example: m

question_heading_1   string  optional    

Auto-generated from validation rules for question_heading_1. Must not be greater than 255 characters. Example: i

question_description_1   string  optional    

Auto-generated from validation rules for question_description_1. Must not be greater than 5000 characters. Example: y

question_heading_2   string  optional    

Auto-generated from validation rules for question_heading_2. Must not be greater than 255 characters. Example: v

question_description_2   string  optional    

Auto-generated from validation rules for question_description_2. Must not be greater than 5000 characters. Example: d

question_heading_3   string  optional    

Auto-generated from validation rules for question_heading_3. Must not be greater than 255 characters. Example: l

question_description_3   string  optional    

Auto-generated from validation rules for question_description_3. Must not be greater than 5000 characters. Example: j

quote   string  optional    

Auto-generated from validation rules for quote. Must not be greater than 2000 characters. Example: n

Update Questions for each goal - why? page

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/questions-goal-why" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline_1\": \"b\",
    \"headline_2\": \"n\",
    \"headline_3\": \"g\",
    \"headline_4\": \"z\",
    \"headline_5\": \"m\",
    \"question_heading_1\": \"i\",
    \"question_description_1\": \"y\",
    \"question_heading_2\": \"v\",
    \"question_description_2\": \"d\",
    \"question_heading_3\": \"l\",
    \"question_description_3\": \"j\",
    \"quote\": \"n\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/intermediate-steps/questions-goal-why"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline_1": "b",
    "headline_2": "n",
    "headline_3": "g",
    "headline_4": "z",
    "headline_5": "m",
    "question_heading_1": "i",
    "question_description_1": "y",
    "question_heading_2": "v",
    "question_description_2": "d",
    "question_heading_3": "l",
    "question_description_3": "j",
    "quote": "n"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/intermediate-steps/questions-goal-why

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

headline_1   string  optional    

Auto-generated from validation rules for headline_1. Must not be greater than 255 characters. Example: b

headline_2   string  optional    

Auto-generated from validation rules for headline_2. Must not be greater than 255 characters. Example: n

headline_3   string  optional    

Auto-generated from validation rules for headline_3. Must not be greater than 255 characters. Example: g

headline_4   string  optional    

Auto-generated from validation rules for headline_4. Must not be greater than 255 characters. Example: z

headline_5   string  optional    

Auto-generated from validation rules for headline_5. Must not be greater than 255 characters. Example: m

question_heading_1   string  optional    

Auto-generated from validation rules for question_heading_1. Must not be greater than 255 characters. Example: i

question_description_1   string  optional    

Auto-generated from validation rules for question_description_1. Must not be greater than 5000 characters. Example: y

question_heading_2   string  optional    

Auto-generated from validation rules for question_heading_2. Must not be greater than 255 characters. Example: v

question_description_2   string  optional    

Auto-generated from validation rules for question_description_2. Must not be greater than 5000 characters. Example: d

question_heading_3   string  optional    

Auto-generated from validation rules for question_heading_3. Must not be greater than 255 characters. Example: l

question_description_3   string  optional    

Auto-generated from validation rules for question_description_3. Must not be greater than 5000 characters. Example: j

quote   string  optional    

Auto-generated from validation rules for quote. Must not be greater than 2000 characters. Example: n

Intermediate Steps - Values Page (Public)

Public API for retrieving the Values Intermediate Page content.

Routes are prefixed with: /api/v1/intermediate-steps

Get Values Intermediate Page content (public)

Returns the headline and points for display.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/intermediate-steps/values" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/intermediate-steps/values"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Values Intermediate Page not found."
}
 

Request      

GET api/v1/intermediate-steps/values

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Intermediate Steps - The Y Method Page (Public)

Public API for retrieving The Y Method Page content.

Routes are prefixed with: /api/v1/intermediate-steps

Get The Y Method Page content (public)

Returns the headline and steps for display.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/intermediate-steps/y-method" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/intermediate-steps/y-method"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "The Y Method Page not found."
}
 

Request      

GET api/v1/intermediate-steps/y-method

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Intermediate Steps - Eight most common mistakes (Public)

Public API for retrieving the Eight most common mistakes page content.

Routes are prefixed with: /api/v1/intermediate-steps

Get Eight most common mistakes page content (public)

Returns the headline and mistakes for display.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/intermediate-steps/eight-most-common-mistakes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/intermediate-steps/eight-most-common-mistakes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Eight most common mistakes page not found."
}
 

Request      

GET api/v1/intermediate-steps/eight-most-common-mistakes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Intermediate Steps - Goal Settings (Public)

Public API for retrieving the Goal Settings Intermediate Page content.

Get Goal Settings Intermediate Page content (public)

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/intermediate-steps/goal-settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/intermediate-steps/goal-settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Goal Settings Intermediate Page not found."
}
 

Request      

GET api/v1/intermediate-steps/goal-settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Intermediate Steps - Questions for each goal - why? (Public)

Public API for retrieving the Questions for each goal - why? page content.

Get Questions for each goal - why? page content (public)

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/intermediate-steps/questions-goal-why" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/intermediate-steps/questions-goal-why"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Questions for each goal - why? page not found."
}
 

Request      

GET api/v1/intermediate-steps/questions-goal-why

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Admin - Legal Pages (CMS)

APIs for managing legal pages (privacy policy, refund policy, terms & conditions). Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/legal-page

Returns all legal pages (privacy policy, refund policy, terms & conditions).

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/legal-page" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/legal-page"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{"success":true,"message":"Legal pages retrieved successfully","data":[{"id":1,"slug":"privacy-policy","content":"...","updated_at":"..."},...]}
 

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/legal-page/privacy-policy" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/legal-page/privacy-policy"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Update the content of a legal page. Slug cannot be changed.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/legal-page/privacy-policy" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"<p>Privacy policy content...<\\/p>\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/legal-page/privacy-policy"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "<p>Privacy policy content...<\/p>"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{"success":true,"message":"Legal page updated successfully","data":{...}}
 

Example response (404):


{
    "success": false,
    "message": "Legal page not found."
}
 

Update the content of a legal page. Slug cannot be changed.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/legal-page/privacy-policy" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"content\": \"<p>Privacy policy content...<\\/p>\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/legal-page/privacy-policy"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "content": "<p>Privacy policy content...<\/p>"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{"success":true,"message":"Legal page updated successfully","data":{...}}
 

Example response (404):


{
    "success": false,
    "message": "Legal page not found."
}
 

Legal Pages (Public)

Public APIs for retrieving legal page content (privacy policy, refund policy, terms & conditions). No authentication required.

Routes are prefixed with: /api/v1/legal-page

Returns the content for the given legal page. Valid slugs: privacy-policy, refund-policy, terms-conditions.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/legal-page/privacy-policy" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/legal-page/privacy-policy"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Legal page retrieved successfully",
    "data": {
        "id": 1,
        "slug": "privacy-policy",
        "content": "...",
        "updated_at": "2026-02-04T14:00:00+00:00"
    }
}
 

Example response (404):


{
    "success": false,
    "message": "Legal page not found."
}
 

Location

APIs for retrieving location data including countries, states, cities, and phone country codes.

Get list of all countries

Retrieve a list of all available countries.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/location/countries" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/location/countries"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Countries retrieved successfully",
    "data": [
        {
            "id": 1,
            "name": "United States"
        },
        {
            "id": 2,
            "name": "Canada"
        }
    ]
}
 

Request      

GET api/v1/location/countries

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Get list of all states for a specific country

Retrieve a list of all states/provinces for a given country.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/location/countries/1/states" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/location/countries/1/states"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "States retrieved successfully",
    "data": [
        {
            "id": 1,
            "country_id": 1,
            "name": "California"
        },
        {
            "id": 2,
            "country_id": 1,
            "name": "New York"
        }
    ]
}
 

Example response (404):


{
    "success": false,
    "message": "Country not found."
}
 

Request      

GET api/v1/location/countries/{countryId}/states

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

countryId   integer     

The ID of the country. Example: 1

Get list of all cities for a specific state

Retrieve a list of all cities for a given state/province.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/location/states/1/cities" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/location/states/1/cities"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Cities retrieved successfully",
    "data": [
        {
            "id": 1,
            "state_id": 1,
            "name": "Los Angeles"
        },
        {
            "id": 2,
            "state_id": 1,
            "name": "San Francisco"
        }
    ]
}
 

Example response (404):


{
    "success": false,
    "message": "State not found."
}
 

Request      

GET api/v1/location/states/{stateId}/cities

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

stateId   integer     

The ID of the state. Example: 1

Get list of all phone country codes

Retrieve a list of all phone country codes. Optionally filter by country ID.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/location/phone-country-codes?country_id=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/location/phone-country-codes"
);

const params = {
    "country_id": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Phone country codes retrieved successfully",
    "data": [
        {
            "id": 1,
            "phone_code": "+1"
        },
        {
            "id": 2,
            "phone_code": "+91"
        }
    ]
}
 

Request      

GET api/v1/location/phone-country-codes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

country_id   integer  optional    

optional Filter phone codes by country ID. Example: 1

Admin - Program Category Management

APIs for managing program categories and sub-categories. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/program-category

Get list of program categories

Optional filter: parent_id=null or omitted for all; parent_id=0 for roots only; parent_id={id} for children of that category.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program-category?page=1&per_page=15&parent_id=" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program-category"
);

const params = {
    "page": "1",
    "per_page": "15",
    "parent_id": "",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program-category

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

parent_id   integer  optional    

optional Filter by parent (0 or "null" for root-level only, or category id for children).

Create a new program category or sub-category

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/program-category" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"parent_id\": null,
    \"name\": \"Personal Training\",
    \"slug\": \"personal-training\",
    \"description\": \"One-on-one fitness coaching sessions.\",
    \"sort_order\": 0,
    \"is_active\": true
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program-category"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "parent_id": null,
    "name": "Personal Training",
    "slug": "personal-training",
    "description": "One-on-one fitness coaching sessions.",
    "sort_order": 0,
    "is_active": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/program-category

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

parent_id   integer  optional    

optional ID of parent category. Omit for top-level.

name   string     

The category name. Example: Personal Training

slug   string  optional    

optional URL-friendly slug. If omitted, generated from name. Example: personal-training

description   string  optional    

optional Description. Example: One-on-one fitness coaching sessions.

sort_order   integer  optional    

optional Display order (lower first). Default 0. Example: 0

is_active   boolean  optional    

optional Whether visible on frontend. Default true. Example: true

Get a specific program category

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the program category. Example: 1

Update a program category

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Personal Training\",
    \"slug\": \"personal-training\",
    \"description\": \"One-on-one fitness coaching sessions.\",
    \"sort_order\": 0,
    \"is_active\": true
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Personal Training",
    "slug": "personal-training",
    "description": "One-on-one fitness coaching sessions.",
    "sort_order": 0,
    "is_active": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the program category. Example: 1

Body Parameters

parent_id   integer  optional    

ID of the parent category. Null for top-level. Cannot set to self. The id of an existing record in the program_categories table. Must not be one of .

name   string  optional    

The category name. Must not be greater than 255 characters. Example: Personal Training

slug   string  optional    

URL-friendly slug. Unique per parent. Must match the regex /^[a-z0-9]+(?:-[a-z0-9]+)*$/. Must not be greater than 255 characters. Example: personal-training

description   string  optional    

Optional description. Must not be greater than 2000 characters. Example: One-on-one fitness coaching sessions.

sort_order   integer  optional    

Display order (lower first). Must be at least 0. Example: 0

is_active   boolean  optional    

Whether the category is visible on the frontend. Example: true

Update a program category

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Personal Training\",
    \"slug\": \"personal-training\",
    \"description\": \"One-on-one fitness coaching sessions.\",
    \"sort_order\": 0,
    \"is_active\": true
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Personal Training",
    "slug": "personal-training",
    "description": "One-on-one fitness coaching sessions.",
    "sort_order": 0,
    "is_active": true
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the program category. Example: 1

Body Parameters

parent_id   integer  optional    

ID of the parent category. Null for top-level. Cannot set to self. The id of an existing record in the program_categories table. Must not be one of .

name   string  optional    

The category name. Must not be greater than 255 characters. Example: Personal Training

slug   string  optional    

URL-friendly slug. Unique per parent. Must match the regex /^[a-z0-9]+(?:-[a-z0-9]+)*$/. Must not be greater than 255 characters. Example: personal-training

description   string  optional    

Optional description. Must not be greater than 2000 characters. Example: One-on-one fitness coaching sessions.

sort_order   integer  optional    

Display order (lower first). Must be at least 0. Example: 0

is_active   boolean  optional    

Whether the category is visible on the frontend. Example: true

Delete a program category

Children will have their parent_id set to null (become root-level) via onDelete('set null').

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/program-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/program-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the program category. Example: 1

Program Categories (Public)

Public APIs for listing program categories and sub-categories. No authentication required. Returns only active categories. Use parent_id filter or nested=1 for tree.

All routes are prefixed with: /api/v1/program-category

List active program categories

Optional: parent_id=null (or 0) for root-level only; parent_id={id} for children of that category. Optional: nested=1 to return root categories with their active children nested.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program-category?page=1&per_page=15&parent_id=&nested=0" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program-category"
);

const params = {
    "page": "1",
    "per_page": "15",
    "parent_id": "",
    "nested": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "Program categories retrieved successfully",
    "data": {
        "data": [],
        "links": {
            "first": "https://ruhline-api.test/api/v1/program-category?page=1",
            "last": "https://ruhline-api.test/api/v1/program-category?page=1",
            "prev": null,
            "next": null
        },
        "meta": {
            "current_page": 1,
            "from": null,
            "last_page": 1,
            "links": [
                {
                    "url": null,
                    "label": "&laquo; Previous",
                    "page": null,
                    "active": false
                },
                {
                    "url": "https://ruhline-api.test/api/v1/program-category?page=1",
                    "label": "1",
                    "page": 1,
                    "active": true
                },
                {
                    "url": null,
                    "label": "Next &raquo;",
                    "page": null,
                    "active": false
                }
            ],
            "path": "https://ruhline-api.test/api/v1/program-category",
            "per_page": 15,
            "to": null,
            "total": 0
        }
    }
}
 

Request      

GET api/v1/program-category

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

parent_id   integer  optional    

optional Filter by parent (null/0 for roots, or category id for children).

nested   integer  optional    

optional Set to 1 to get root categories with children nested. Example: 0

Get a single active program category (optionally with children)

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program-category/1?with_children=0" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program-category/1"
);

const params = {
    "with_children": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (404):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Program category not found."
}
 

Request      

GET api/v1/program-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the program category. Example: 1

Query Parameters

with_children   integer  optional    

optional Set to 1 to include active child categories. Example: 0

Admin - Program Management

APIs for managing programs. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/program

Get list of programs

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program?page=1&per_page=15&program_category_id=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program"
);

const params = {
    "page": "1",
    "per_page": "15",
    "program_category_id": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

program_category_id   integer  optional    

optional Filter by program category. Example: 1

Create a new program

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/program" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=b"\
    --form "program_category_id=16"\
    --form "description=Eius et animi quos velit et."\
    --form "occurrence_type=one_time"\
    --form "session_duration_minutes=120"\
    --form "tenure_weeks=1"\
    --form "sessions_per_week=1"\
    --form "sale_price=37"\
    --form "original_price=9"\
    --form "coach_commission_type=global"\
    --form "custom_commission_rate=17"\
    --form "coach_ids[]=16"\
    --form "tag=new"\
    --form "faqs[][heading]=n"\
    --form "faqs[][description]=Eius et animi quos velit et."\
    --form "faqs[][sort_order]=60"\
    --form "benefits[][description]=Eius et animi quos velit et."\
    --form "benefits[][sort_order]=60"\
    --form "how_it_works[][description]=Eius et animi quos velit et."\
    --form "how_it_works[][sort_order]=60"\
    --form "main_image=@C:\Users\AMITB\AppData\Local\Temp\php3C59.tmp" \
    --form "gallery_images[]=@C:\Users\AMITB\AppData\Local\Temp\php3C5A.tmp" \
    --form "faqs_section_image=@C:\Users\AMITB\AppData\Local\Temp\php3C5B.tmp" \
    --form "benefits_section_image=@C:\Users\AMITB\AppData\Local\Temp\php3C5C.tmp" \
    --form "how_it_works_section_image=@C:\Users\AMITB\AppData\Local\Temp\php3C5D.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'b');
body.append('program_category_id', '16');
body.append('description', 'Eius et animi quos velit et.');
body.append('occurrence_type', 'one_time');
body.append('session_duration_minutes', '120');
body.append('tenure_weeks', '1');
body.append('sessions_per_week', '1');
body.append('sale_price', '37');
body.append('original_price', '9');
body.append('coach_commission_type', 'global');
body.append('custom_commission_rate', '17');
body.append('coach_ids[]', '16');
body.append('tag', 'new');
body.append('faqs[][heading]', 'n');
body.append('faqs[][description]', 'Eius et animi quos velit et.');
body.append('faqs[][sort_order]', '60');
body.append('benefits[][description]', 'Eius et animi quos velit et.');
body.append('benefits[][sort_order]', '60');
body.append('how_it_works[][description]', 'Eius et animi quos velit et.');
body.append('how_it_works[][sort_order]', '60');
body.append('main_image', document.querySelector('input[name="main_image"]').files[0]);
body.append('gallery_images[]', document.querySelector('input[name="gallery_images[]"]').files[0]);
body.append('faqs_section_image', document.querySelector('input[name="faqs_section_image"]').files[0]);
body.append('benefits_section_image', document.querySelector('input[name="benefits_section_image"]').files[0]);
body.append('how_it_works_section_image', document.querySelector('input[name="how_it_works_section_image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/admin/program

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

name   string     

Auto-generated from validation rules for name. Must not be greater than 255 characters. Example: b

program_category_id   integer     

Auto-generated from validation rules for program_category_id. The id of an existing record in the program_categories table. Example: 16

description   string  optional    

Auto-generated from validation rules for description. Example: Eius et animi quos velit et.

main_image   file  optional    

Auto-generated from validation rules for main_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3C59.tmp

gallery_images   file[]  optional    

Auto-generated from validation rules for gallery_images.*. Must be an image. Must not be greater than 2048 kilobytes.

faqs_section_image   file  optional    

Auto-generated from validation rules for faqs_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3C5B.tmp

faqs   object[]  optional    

Auto-generated from validation rules for faqs.

heading   string     

Auto-generated from validation rules for faqs.*.heading. Must not be greater than 500 characters. Example: n

description   string     

Auto-generated from validation rules for faqs.*.description. Example: Eius et animi quos velit et.

sort_order   integer  optional    

Auto-generated from validation rules for faqs.*.sort_order. Must be at least 0. Example: 60

benefits_section_image   file  optional    

Auto-generated from validation rules for benefits_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3C5C.tmp

benefits   object[]  optional    

Auto-generated from validation rules for benefits.

description   string     

Auto-generated from validation rules for benefits.*.description. Example: Eius et animi quos velit et.

sort_order   integer  optional    

Auto-generated from validation rules for benefits.*.sort_order. Must be at least 0. Example: 60

how_it_works_section_image   file  optional    

Auto-generated from validation rules for how_it_works_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3C5D.tmp

how_it_works   object[]  optional    

Auto-generated from validation rules for how_it_works.

description   string     

Auto-generated from validation rules for how_it_works.*.description. Example: Eius et animi quos velit et.

sort_order   integer  optional    

Auto-generated from validation rules for how_it_works.*.sort_order. Must be at least 0. Example: 60

occurrence_type   string     

Auto-generated from validation rules for occurrence_type. Example: one_time

Must be one of:
  • one_time
  • recurring
session_duration_minutes   integer     

Auto-generated from validation rules for session_duration_minutes. Example: 120

Must be one of:
  • 30
  • 45
  • 60
  • 75
  • 90
  • 105
  • 120
  • 135
  • 150
  • 165
  • 180
  • 195
  • 210
  • 225
  • 240
tenure_weeks   integer  optional    

Auto-generated from validation rules for tenure_weeks. This field is required when occurrence_type is recurring. Must be at least 1. Must not be greater than 520. Example: 1

sessions_per_week   integer  optional    

Auto-generated from validation rules for sessions_per_week. This field is required when occurrence_type is recurring. Must be at least 1. Must not be greater than 28. Example: 1

sale_price   number     

Auto-generated from validation rules for sale_price. Must be at least 0. Example: 37

original_price   number     

Auto-generated from validation rules for original_price. Must be at least 0. Example: 9

coach_commission_type   string     

Auto-generated from validation rules for coach_commission_type. Example: global

Must be one of:
  • global
  • custom
custom_commission_rate   number  optional    

Auto-generated from validation rules for custom_commission_rate. This field is required when coach_commission_type is custom. Must be at least 0. Must not be greater than 100. Example: 17

coach_ids   integer[]  optional    

Auto-generated from validation rules for coach_ids.*. The id of an existing record in the coaches table.

tag   string  optional    

Auto-generated from validation rules for tag. Example: new

Must be one of:
  • new
  • bestselling
  • most_rated
  • recommended

Get a specific program

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the program. Example: 1

Update a program

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/program/1" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=b"\
    --form "program_category_id=16"\
    --form "description=Eius et animi quos velit et."\
    --form "occurrence_type=recurring"\
    --form "session_duration_minutes=45"\
    --form "tenure_weeks=1"\
    --form "sessions_per_week=1"\
    --form "sale_price=37"\
    --form "original_price=9"\
    --form "coach_commission_type=global"\
    --form "custom_commission_rate=17"\
    --form "coach_ids[]=16"\
    --form "tag=new"\
    --form "faqs[][id]=16"\
    --form "faqs[][heading]=n"\
    --form "faqs[][description]=Eius et animi quos velit et."\
    --form "faqs[][sort_order]=60"\
    --form "benefits[][id]=16"\
    --form "benefits[][description]=Eius et animi quos velit et."\
    --form "benefits[][sort_order]=60"\
    --form "how_it_works[][id]=16"\
    --form "how_it_works[][description]=Eius et animi quos velit et."\
    --form "how_it_works[][sort_order]=60"\
    --form "main_image=@C:\Users\AMITB\AppData\Local\Temp\php3C7E.tmp" \
    --form "gallery_images[]=@C:\Users\AMITB\AppData\Local\Temp\php3C7F.tmp" \
    --form "faqs_section_image=@C:\Users\AMITB\AppData\Local\Temp\php3C80.tmp" \
    --form "benefits_section_image=@C:\Users\AMITB\AppData\Local\Temp\php3C81.tmp" \
    --form "how_it_works_section_image=@C:\Users\AMITB\AppData\Local\Temp\php3C82.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/1"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'b');
body.append('program_category_id', '16');
body.append('description', 'Eius et animi quos velit et.');
body.append('occurrence_type', 'recurring');
body.append('session_duration_minutes', '45');
body.append('tenure_weeks', '1');
body.append('sessions_per_week', '1');
body.append('sale_price', '37');
body.append('original_price', '9');
body.append('coach_commission_type', 'global');
body.append('custom_commission_rate', '17');
body.append('coach_ids[]', '16');
body.append('tag', 'new');
body.append('faqs[][id]', '16');
body.append('faqs[][heading]', 'n');
body.append('faqs[][description]', 'Eius et animi quos velit et.');
body.append('faqs[][sort_order]', '60');
body.append('benefits[][id]', '16');
body.append('benefits[][description]', 'Eius et animi quos velit et.');
body.append('benefits[][sort_order]', '60');
body.append('how_it_works[][id]', '16');
body.append('how_it_works[][description]', 'Eius et animi quos velit et.');
body.append('how_it_works[][sort_order]', '60');
body.append('main_image', document.querySelector('input[name="main_image"]').files[0]);
body.append('gallery_images[]', document.querySelector('input[name="gallery_images[]"]').files[0]);
body.append('faqs_section_image', document.querySelector('input[name="faqs_section_image"]').files[0]);
body.append('benefits_section_image', document.querySelector('input[name="benefits_section_image"]').files[0]);
body.append('how_it_works_section_image', document.querySelector('input[name="how_it_works_section_image"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/admin/program/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the program. Example: 1

Body Parameters

name   string  optional    

Auto-generated from validation rules for name. Must not be greater than 255 characters. Example: b

program_category_id   integer  optional    

Auto-generated from validation rules for program_category_id. The id of an existing record in the program_categories table. Example: 16

description   string  optional    

Auto-generated from validation rules for description. Example: Eius et animi quos velit et.

main_image   file  optional    

Auto-generated from validation rules for main_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3C7E.tmp

gallery_images   file[]  optional    

Auto-generated from validation rules for gallery_images.*. Must be an image. Must not be greater than 2048 kilobytes.

faqs_section_image   file  optional    

Auto-generated from validation rules for faqs_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3C80.tmp

faqs   object[]  optional    

Auto-generated from validation rules for faqs.

id   integer  optional    

Auto-generated from validation rules for faqs.*.id. The id of an existing record in the program_faqs table. Example: 16

heading   string     

Auto-generated from validation rules for faqs.*.heading. Must not be greater than 500 characters. Example: n

description   string     

Auto-generated from validation rules for faqs.*.description. Example: Eius et animi quos velit et.

sort_order   integer  optional    

Auto-generated from validation rules for faqs.*.sort_order. Must be at least 0. Example: 60

benefits_section_image   file  optional    

Auto-generated from validation rules for benefits_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3C81.tmp

benefits   object[]  optional    

Auto-generated from validation rules for benefits.

id   integer  optional    

Auto-generated from validation rules for benefits.*.id. The id of an existing record in the program_benefits table. Example: 16

description   string     

Auto-generated from validation rules for benefits.*.description. Example: Eius et animi quos velit et.

sort_order   integer  optional    

Auto-generated from validation rules for benefits.*.sort_order. Must be at least 0. Example: 60

how_it_works_section_image   file  optional    

Auto-generated from validation rules for how_it_works_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3C82.tmp

how_it_works   object[]  optional    

Auto-generated from validation rules for how_it_works.

id   integer  optional    

Auto-generated from validation rules for how_it_works.*.id. The id of an existing record in the program_how_it_works table. Example: 16

description   string     

Auto-generated from validation rules for how_it_works.*.description. Example: Eius et animi quos velit et.

sort_order   integer  optional    

Auto-generated from validation rules for how_it_works.*.sort_order. Must be at least 0. Example: 60

occurrence_type   string  optional    

Auto-generated from validation rules for occurrence_type. Example: recurring

Must be one of:
  • one_time
  • recurring
session_duration_minutes   integer  optional    

Auto-generated from validation rules for session_duration_minutes. Example: 45

Must be one of:
  • 30
  • 45
  • 60
  • 75
  • 90
  • 105
  • 120
  • 135
  • 150
  • 165
  • 180
  • 195
  • 210
  • 225
  • 240
tenure_weeks   integer  optional    

Auto-generated from validation rules for tenure_weeks. Must be at least 1. Must not be greater than 520. Example: 1

sessions_per_week   integer  optional    

Auto-generated from validation rules for sessions_per_week. Must be at least 1. Must not be greater than 28. Example: 1

sale_price   number  optional    

Auto-generated from validation rules for sale_price. Must be at least 0. Example: 37

original_price   number  optional    

Auto-generated from validation rules for original_price. Must be at least 0. Example: 9

coach_commission_type   string  optional    

Auto-generated from validation rules for coach_commission_type. Example: global

Must be one of:
  • global
  • custom
custom_commission_rate   number  optional    

Auto-generated from validation rules for custom_commission_rate. Must be at least 0. Must not be greater than 100. Example: 17

coach_ids   integer[]  optional    

Auto-generated from validation rules for coach_ids.*. The id of an existing record in the coaches table.

tag   string  optional    

Auto-generated from validation rules for tag. Example: new

Must be one of:
  • new
  • bestselling
  • most_rated
  • recommended

Update a program

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/1" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=b"\
    --form "program_category_id=16"\
    --form "description=Eius et animi quos velit et."\
    --form "occurrence_type=recurring"\
    --form "session_duration_minutes=210"\
    --form "tenure_weeks=1"\
    --form "sessions_per_week=1"\
    --form "sale_price=37"\
    --form "original_price=9"\
    --form "coach_commission_type=global"\
    --form "custom_commission_rate=17"\
    --form "coach_ids[]=16"\
    --form "tag=new"\
    --form "faqs[][id]=16"\
    --form "faqs[][heading]=n"\
    --form "faqs[][description]=Eius et animi quos velit et."\
    --form "faqs[][sort_order]=60"\
    --form "benefits[][id]=16"\
    --form "benefits[][description]=Eius et animi quos velit et."\
    --form "benefits[][sort_order]=60"\
    --form "how_it_works[][id]=16"\
    --form "how_it_works[][description]=Eius et animi quos velit et."\
    --form "how_it_works[][sort_order]=60"\
    --form "main_image=@C:\Users\AMITB\AppData\Local\Temp\php3C92.tmp" \
    --form "gallery_images[]=@C:\Users\AMITB\AppData\Local\Temp\php3C93.tmp" \
    --form "faqs_section_image=@C:\Users\AMITB\AppData\Local\Temp\php3C94.tmp" \
    --form "benefits_section_image=@C:\Users\AMITB\AppData\Local\Temp\php3C95.tmp" \
    --form "how_it_works_section_image=@C:\Users\AMITB\AppData\Local\Temp\php3C96.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/1"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'b');
body.append('program_category_id', '16');
body.append('description', 'Eius et animi quos velit et.');
body.append('occurrence_type', 'recurring');
body.append('session_duration_minutes', '210');
body.append('tenure_weeks', '1');
body.append('sessions_per_week', '1');
body.append('sale_price', '37');
body.append('original_price', '9');
body.append('coach_commission_type', 'global');
body.append('custom_commission_rate', '17');
body.append('coach_ids[]', '16');
body.append('tag', 'new');
body.append('faqs[][id]', '16');
body.append('faqs[][heading]', 'n');
body.append('faqs[][description]', 'Eius et animi quos velit et.');
body.append('faqs[][sort_order]', '60');
body.append('benefits[][id]', '16');
body.append('benefits[][description]', 'Eius et animi quos velit et.');
body.append('benefits[][sort_order]', '60');
body.append('how_it_works[][id]', '16');
body.append('how_it_works[][description]', 'Eius et animi quos velit et.');
body.append('how_it_works[][sort_order]', '60');
body.append('main_image', document.querySelector('input[name="main_image"]').files[0]);
body.append('gallery_images[]', document.querySelector('input[name="gallery_images[]"]').files[0]);
body.append('faqs_section_image', document.querySelector('input[name="faqs_section_image"]').files[0]);
body.append('benefits_section_image', document.querySelector('input[name="benefits_section_image"]').files[0]);
body.append('how_it_works_section_image', document.querySelector('input[name="how_it_works_section_image"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the program. Example: 1

Body Parameters

name   string  optional    

Auto-generated from validation rules for name. Must not be greater than 255 characters. Example: b

program_category_id   integer  optional    

Auto-generated from validation rules for program_category_id. The id of an existing record in the program_categories table. Example: 16

description   string  optional    

Auto-generated from validation rules for description. Example: Eius et animi quos velit et.

main_image   file  optional    

Auto-generated from validation rules for main_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3C92.tmp

gallery_images   file[]  optional    

Auto-generated from validation rules for gallery_images.*. Must be an image. Must not be greater than 2048 kilobytes.

faqs_section_image   file  optional    

Auto-generated from validation rules for faqs_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3C94.tmp

faqs   object[]  optional    

Auto-generated from validation rules for faqs.

id   integer  optional    

Auto-generated from validation rules for faqs.*.id. The id of an existing record in the program_faqs table. Example: 16

heading   string     

Auto-generated from validation rules for faqs.*.heading. Must not be greater than 500 characters. Example: n

description   string     

Auto-generated from validation rules for faqs.*.description. Example: Eius et animi quos velit et.

sort_order   integer  optional    

Auto-generated from validation rules for faqs.*.sort_order. Must be at least 0. Example: 60

benefits_section_image   file  optional    

Auto-generated from validation rules for benefits_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3C95.tmp

benefits   object[]  optional    

Auto-generated from validation rules for benefits.

id   integer  optional    

Auto-generated from validation rules for benefits.*.id. The id of an existing record in the program_benefits table. Example: 16

description   string     

Auto-generated from validation rules for benefits.*.description. Example: Eius et animi quos velit et.

sort_order   integer  optional    

Auto-generated from validation rules for benefits.*.sort_order. Must be at least 0. Example: 60

how_it_works_section_image   file  optional    

Auto-generated from validation rules for how_it_works_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3C96.tmp

how_it_works   object[]  optional    

Auto-generated from validation rules for how_it_works.

id   integer  optional    

Auto-generated from validation rules for how_it_works.*.id. The id of an existing record in the program_how_it_works table. Example: 16

description   string     

Auto-generated from validation rules for how_it_works.*.description. Example: Eius et animi quos velit et.

sort_order   integer  optional    

Auto-generated from validation rules for how_it_works.*.sort_order. Must be at least 0. Example: 60

occurrence_type   string  optional    

Auto-generated from validation rules for occurrence_type. Example: recurring

Must be one of:
  • one_time
  • recurring
session_duration_minutes   integer  optional    

Auto-generated from validation rules for session_duration_minutes. Example: 210

Must be one of:
  • 30
  • 45
  • 60
  • 75
  • 90
  • 105
  • 120
  • 135
  • 150
  • 165
  • 180
  • 195
  • 210
  • 225
  • 240
tenure_weeks   integer  optional    

Auto-generated from validation rules for tenure_weeks. Must be at least 1. Must not be greater than 520. Example: 1

sessions_per_week   integer  optional    

Auto-generated from validation rules for sessions_per_week. Must be at least 1. Must not be greater than 28. Example: 1

sale_price   number  optional    

Auto-generated from validation rules for sale_price. Must be at least 0. Example: 37

original_price   number  optional    

Auto-generated from validation rules for original_price. Must be at least 0. Example: 9

coach_commission_type   string  optional    

Auto-generated from validation rules for coach_commission_type. Example: global

Must be one of:
  • global
  • custom
custom_commission_rate   number  optional    

Auto-generated from validation rules for custom_commission_rate. Must be at least 0. Must not be greater than 100. Example: 17

coach_ids   integer[]  optional    

Auto-generated from validation rules for coach_ids.*. The id of an existing record in the coaches table.

tag   string  optional    

Auto-generated from validation rules for tag. Example: new

Must be one of:
  • new
  • bestselling
  • most_rated
  • recommended

Update a program

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/1" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=b"\
    --form "program_category_id=16"\
    --form "description=Eius et animi quos velit et."\
    --form "occurrence_type=recurring"\
    --form "session_duration_minutes=45"\
    --form "tenure_weeks=1"\
    --form "sessions_per_week=1"\
    --form "sale_price=37"\
    --form "original_price=9"\
    --form "coach_commission_type=global"\
    --form "custom_commission_rate=24"\
    --form "coach_ids[]=16"\
    --form "tag=bestselling"\
    --form "faqs[][id]=16"\
    --form "faqs[][heading]=n"\
    --form "faqs[][description]=Eius et animi quos velit et."\
    --form "faqs[][sort_order]=60"\
    --form "benefits[][id]=16"\
    --form "benefits[][description]=Eius et animi quos velit et."\
    --form "benefits[][sort_order]=60"\
    --form "how_it_works[][id]=16"\
    --form "how_it_works[][description]=Eius et animi quos velit et."\
    --form "how_it_works[][sort_order]=60"\
    --form "main_image=@C:\Users\AMITB\AppData\Local\Temp\php3CA7.tmp" \
    --form "gallery_images[]=@C:\Users\AMITB\AppData\Local\Temp\php3CA8.tmp" \
    --form "faqs_section_image=@C:\Users\AMITB\AppData\Local\Temp\php3CA9.tmp" \
    --form "benefits_section_image=@C:\Users\AMITB\AppData\Local\Temp\php3CAA.tmp" \
    --form "how_it_works_section_image=@C:\Users\AMITB\AppData\Local\Temp\php3CAB.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/1"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'b');
body.append('program_category_id', '16');
body.append('description', 'Eius et animi quos velit et.');
body.append('occurrence_type', 'recurring');
body.append('session_duration_minutes', '45');
body.append('tenure_weeks', '1');
body.append('sessions_per_week', '1');
body.append('sale_price', '37');
body.append('original_price', '9');
body.append('coach_commission_type', 'global');
body.append('custom_commission_rate', '24');
body.append('coach_ids[]', '16');
body.append('tag', 'bestselling');
body.append('faqs[][id]', '16');
body.append('faqs[][heading]', 'n');
body.append('faqs[][description]', 'Eius et animi quos velit et.');
body.append('faqs[][sort_order]', '60');
body.append('benefits[][id]', '16');
body.append('benefits[][description]', 'Eius et animi quos velit et.');
body.append('benefits[][sort_order]', '60');
body.append('how_it_works[][id]', '16');
body.append('how_it_works[][description]', 'Eius et animi quos velit et.');
body.append('how_it_works[][sort_order]', '60');
body.append('main_image', document.querySelector('input[name="main_image"]').files[0]);
body.append('gallery_images[]', document.querySelector('input[name="gallery_images[]"]').files[0]);
body.append('faqs_section_image', document.querySelector('input[name="faqs_section_image"]').files[0]);
body.append('benefits_section_image', document.querySelector('input[name="benefits_section_image"]').files[0]);
body.append('how_it_works_section_image', document.querySelector('input[name="how_it_works_section_image"]').files[0]);

fetch(url, {
    method: "PATCH",
    headers,
    body,
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the program. Example: 1

Body Parameters

name   string  optional    

Auto-generated from validation rules for name. Must not be greater than 255 characters. Example: b

program_category_id   integer  optional    

Auto-generated from validation rules for program_category_id. The id of an existing record in the program_categories table. Example: 16

description   string  optional    

Auto-generated from validation rules for description. Example: Eius et animi quos velit et.

main_image   file  optional    

Auto-generated from validation rules for main_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3CA7.tmp

gallery_images   file[]  optional    

Auto-generated from validation rules for gallery_images.*. Must be an image. Must not be greater than 2048 kilobytes.

faqs_section_image   file  optional    

Auto-generated from validation rules for faqs_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3CA9.tmp

faqs   object[]  optional    

Auto-generated from validation rules for faqs.

id   integer  optional    

Auto-generated from validation rules for faqs.*.id. The id of an existing record in the program_faqs table. Example: 16

heading   string     

Auto-generated from validation rules for faqs.*.heading. Must not be greater than 500 characters. Example: n

description   string     

Auto-generated from validation rules for faqs.*.description. Example: Eius et animi quos velit et.

sort_order   integer  optional    

Auto-generated from validation rules for faqs.*.sort_order. Must be at least 0. Example: 60

benefits_section_image   file  optional    

Auto-generated from validation rules for benefits_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3CAA.tmp

benefits   object[]  optional    

Auto-generated from validation rules for benefits.

id   integer  optional    

Auto-generated from validation rules for benefits.*.id. The id of an existing record in the program_benefits table. Example: 16

description   string     

Auto-generated from validation rules for benefits.*.description. Example: Eius et animi quos velit et.

sort_order   integer  optional    

Auto-generated from validation rules for benefits.*.sort_order. Must be at least 0. Example: 60

how_it_works_section_image   file  optional    

Auto-generated from validation rules for how_it_works_section_image. Must be an image. Must not be greater than 2048 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3CAB.tmp

how_it_works   object[]  optional    

Auto-generated from validation rules for how_it_works.

id   integer  optional    

Auto-generated from validation rules for how_it_works.*.id. The id of an existing record in the program_how_it_works table. Example: 16

description   string     

Auto-generated from validation rules for how_it_works.*.description. Example: Eius et animi quos velit et.

sort_order   integer  optional    

Auto-generated from validation rules for how_it_works.*.sort_order. Must be at least 0. Example: 60

occurrence_type   string  optional    

Auto-generated from validation rules for occurrence_type. Example: recurring

Must be one of:
  • one_time
  • recurring
session_duration_minutes   integer  optional    

Auto-generated from validation rules for session_duration_minutes. Example: 45

Must be one of:
  • 30
  • 45
  • 60
  • 75
  • 90
  • 105
  • 120
  • 135
  • 150
  • 165
  • 180
  • 195
  • 210
  • 225
  • 240
tenure_weeks   integer  optional    

Auto-generated from validation rules for tenure_weeks. Must be at least 1. Must not be greater than 520. Example: 1

sessions_per_week   integer  optional    

Auto-generated from validation rules for sessions_per_week. Must be at least 1. Must not be greater than 28. Example: 1

sale_price   number  optional    

Auto-generated from validation rules for sale_price. Must be at least 0. Example: 37

original_price   number  optional    

Auto-generated from validation rules for original_price. Must be at least 0. Example: 9

coach_commission_type   string  optional    

Auto-generated from validation rules for coach_commission_type. Example: global

Must be one of:
  • global
  • custom
custom_commission_rate   number  optional    

Auto-generated from validation rules for custom_commission_rate. Must be at least 0. Must not be greater than 100. Example: 24

coach_ids   integer[]  optional    

Auto-generated from validation rules for coach_ids.*. The id of an existing record in the coaches table.

tag   string  optional    

Auto-generated from validation rules for tag. Example: bestselling

Must be one of:
  • new
  • bestselling
  • most_rated
  • recommended

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/program/1/gallery/5" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/1/gallery/5"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Delete a program

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/program/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/program/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the program. Example: 1

Admin - Program Reviews

GET api/v1/admin/review

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/review" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/review"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/review

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/review/{id}

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/review/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/review/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/review/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the review. Example: architecto

Admin - Program Settings

APIs for managing program settings (Quote Category and Card Category per program). Used to select which quote category and card category are used for this program (e.g. for future quotes and cards modules).

Routes: /api/v1/admin/program/{id}/settings

Get program settings (quote category and card category).

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

Update program settings (set or change quote category and/or card category).

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quote_category_id\": 16,
    \"card_category_id\": 16,
    \"coach_can_edit_modules\": false,
    \"coach_editable_module_types\": [
        \"wheel_of_life\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "quote_category_id": 16,
    "card_category_id": 16,
    "coach_can_edit_modules": false,
    "coach_editable_module_types": [
        "wheel_of_life"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

Body Parameters

quote_category_id   integer  optional    

Auto-generated from validation rules for quote_category_id. The id of an existing record in the quote_categories table. Example: 16

card_category_id   integer  optional    

Auto-generated from validation rules for card_category_id. The id of an existing record in the card_categories table. Example: 16

coach_can_edit_modules   boolean  optional    

Auto-generated from validation rules for coach_can_edit_modules. Example: false

coach_editable_module_types   string[]  optional    

Auto-generated from validation rules for coach_editable_module_types.*.

Must be one of:
  • values
  • wheel_of_life
  • find_your_motivation
  • upload_documents
  • who_am_i

Update program settings (set or change quote category and/or card category).

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quote_category_id\": 16,
    \"card_category_id\": 16,
    \"coach_can_edit_modules\": true,
    \"coach_editable_module_types\": [
        \"who_am_i\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "quote_category_id": 16,
    "card_category_id": 16,
    "coach_can_edit_modules": true,
    "coach_editable_module_types": [
        "who_am_i"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

Body Parameters

quote_category_id   integer  optional    

Auto-generated from validation rules for quote_category_id. The id of an existing record in the quote_categories table. Example: 16

card_category_id   integer  optional    

Auto-generated from validation rules for card_category_id. The id of an existing record in the card_categories table. Example: 16

coach_can_edit_modules   boolean  optional    

Auto-generated from validation rules for coach_can_edit_modules. Example: true

coach_editable_module_types   string[]  optional    

Auto-generated from validation rules for coach_editable_module_types.*.

Must be one of:
  • values
  • wheel_of_life
  • find_your_motivation
  • upload_documents
  • who_am_i

Admin - Program Structure

APIs for managing program structure (ordered modules) and module content. Routes: /api/v1/admin/program/{id}/structure

List program structure (all modules in order).

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

Add a module to the program structure.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"module_type\": \"who_am_i\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "module_type": "who_am_i"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/program/{id}/structure

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

Body Parameters

module_type   string     

Auto-generated from validation rules for module_type. Example: who_am_i

Must be one of:
  • find_your_motivation
  • values
  • wheel_of_life
  • who_am_i
  • quote
  • card_game
  • upload_documents
  • goal_settings
  • habit_tracker
  • intermediate_values
  • intermediate_eight_common_mistakes
  • intermediate_goal_settings
  • intermediate_questions_goal_why
  • intermediate_y_method

Reorder modules in the program structure.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structures table.

Reorder modules in the program structure.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structures table.

Remove a module from the program structure.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/program/{id}/structure/{structureId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

List words for a Find your Motivation module.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/words

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Add a word to a Find your Motivation module.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"word\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "word": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/program/{id}/structure/{structureId}/words

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

word   string     

Auto-generated from validation rules for word. Must not be greater than 255 characters. Example: b

Reorder words in a Find your Motivation module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/words/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_find_your_motivation_words table.

Reorder words in a Find your Motivation module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/words/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_find_your_motivation_words table.

Update a word in a Find your Motivation module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"word\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "word": "b"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/words/{wordId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

wordId   string     

Example: architecto

Body Parameters

word   string     

Auto-generated from validation rules for word. Must not be greater than 255 characters. Example: b

Update a word in a Find your Motivation module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"word\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "word": "b"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/words/{wordId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

wordId   string     

Example: architecto

Body Parameters

word   string     

Auto-generated from validation rules for word. Must not be greater than 255 characters. Example: b

Delete a word from a Find your Motivation module.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/words/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/program/{id}/structure/{structureId}/words/{wordId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

wordId   string     

Example: architecto

List questions for a Values module.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/values/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Add a question to a Values module.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"single_choice\",
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "single_choice",
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/program/{id}/structure/{structureId}/values/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

type   string     

Auto-generated from validation rules for type. Example: single_choice

Must be one of:
  • descriptive
  • multi_choice
  • single_choice
  • dropdown
question_text   string     

Auto-generated from validation rules for question_text. Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Auto-generated from validation rules for options.*. Must not be greater than 500 characters.

Reorder questions in a Values module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/values/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_values_questions table.

Reorder questions in a Values module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/values/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_values_questions table.

Update a question in a Values module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"descriptive\",
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "descriptive",
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/values/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string     

Auto-generated from validation rules for type. Example: descriptive

Must be one of:
  • descriptive
  • multi_choice
  • single_choice
  • dropdown
question_text   string     

Auto-generated from validation rules for question_text. Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Auto-generated from validation rules for options.*. Must not be greater than 500 characters.

Update a question in a Values module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"dropdown\",
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "dropdown",
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/values/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string     

Auto-generated from validation rules for type. Example: dropdown

Must be one of:
  • descriptive
  • multi_choice
  • single_choice
  • dropdown
question_text   string     

Auto-generated from validation rules for question_text. Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Auto-generated from validation rules for options.*. Must not be greater than 500 characters.

Delete a question from a Values module.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/values/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/program/{id}/structure/{structureId}/values/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

List questions for a Who am I module.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/who-am-i/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Add a question to a Who am I module.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"descriptive\",
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "descriptive",
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/program/{id}/structure/{structureId}/who-am-i/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

type   string     

Auto-generated from validation rules for type. Example: descriptive

Must be one of:
  • descriptive
  • multi_choice
  • single_choice
  • dropdown
question_text   string     

Auto-generated from validation rules for question_text. Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Auto-generated from validation rules for options.*. Must not be greater than 500 characters.

Reorder questions in a Who am I module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/who-am-i/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_who_am_i_questions table.

Reorder questions in a Who am I module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/who-am-i/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_who_am_i_questions table.

Update a question in a Who am I module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"single_choice\",
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "single_choice",
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/who-am-i/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string     

Auto-generated from validation rules for type. Example: single_choice

Must be one of:
  • descriptive
  • multi_choice
  • single_choice
  • dropdown
question_text   string     

Auto-generated from validation rules for question_text. Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Auto-generated from validation rules for options.*. Must not be greater than 500 characters.

Update a question in a Who am I module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"descriptive\",
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "descriptive",
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/who-am-i/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string     

Auto-generated from validation rules for type. Example: descriptive

Must be one of:
  • descriptive
  • multi_choice
  • single_choice
  • dropdown
question_text   string     

Auto-generated from validation rules for question_text. Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Auto-generated from validation rules for options.*. Must not be greater than 500 characters.

Delete a question from a Who am I module.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/who-am-i/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/program/{id}/structure/{structureId}/who-am-i/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

List question sets for a Card Game module.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/card-game/question-sets

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Reorder question sets in a Card Game module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/card-game/question-sets/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_card_game_question_sets table.

Reorder question sets in a Card Game module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/card-game/question-sets/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_card_game_question_sets table.

Update a question set (e.g. rename title) in a Card Game module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "b"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/card-game/question-sets/{setId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

Body Parameters

title   string     

Auto-generated from validation rules for title. Must not be greater than 255 characters. Example: b

Update a question set (e.g. rename title) in a Card Game module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "b"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/card-game/question-sets/{setId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

Body Parameters

title   string     

Auto-generated from validation rules for title. Must not be greater than 255 characters. Example: b

Delete a question set from a Card Game module.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/program/{id}/structure/{structureId}/card-game/question-sets/{setId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

List questions in a Card Game question set.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/card-game/question-sets/{setId}/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

Add a question to a Card Game question set.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"descriptive\",
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "descriptive",
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/program/{id}/structure/{structureId}/card-game/question-sets/{setId}/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

Body Parameters

type   string     

Auto-generated from validation rules for type. Example: descriptive

Must be one of:
  • descriptive
  • multi_choice
  • single_choice
  • dropdown
question_text   string     

Auto-generated from validation rules for question_text. Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Auto-generated from validation rules for options.*. Must not be greater than 500 characters.

Reorder questions in a Card Game question set.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/card-game/question-sets/{setId}/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_card_game_questions table.

Reorder questions in a Card Game question set.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/card-game/question-sets/{setId}/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_card_game_questions table.

Update a question in a Card Game question set.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"dropdown\",
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "dropdown",
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/card-game/question-sets/{setId}/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string     

Auto-generated from validation rules for type. Example: dropdown

Must be one of:
  • descriptive
  • multi_choice
  • single_choice
  • dropdown
question_text   string     

Auto-generated from validation rules for question_text. Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Auto-generated from validation rules for options.*. Must not be greater than 500 characters.

Update a question in a Card Game question set.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"single_choice\",
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "single_choice",
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/card-game/question-sets/{setId}/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string     

Auto-generated from validation rules for type. Example: single_choice

Must be one of:
  • descriptive
  • multi_choice
  • single_choice
  • dropdown
question_text   string     

Auto-generated from validation rules for question_text. Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Auto-generated from validation rules for options.*. Must not be greater than 500 characters.

Delete a question from a Card Game question set.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/question-sets/architecto/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/program/{id}/structure/{structureId}/card-game/question-sets/{setId}/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

questionId   string     

Example: architecto

List cards for a Card Game module.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/card-game/cards

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Add a new card to a Card Game module.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/program/{id}/structure/{structureId}/card-game/cards

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

name   string     

Auto-generated from validation rules for name. Must not be greater than 255 characters. Example: b

description   string  optional    

Auto-generated from validation rules for description. Example: Eius et animi quos velit et.

Reorder cards in a Card Game module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/card-game/cards/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Reorder cards in a Card Game module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/card-game/cards/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Update a card in a Card Game module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et."
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/card-game/cards/{cardId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

cardId   string     

Example: architecto

Body Parameters

name   string  optional    

Auto-generated from validation rules for name. Must not be greater than 255 characters. Example: b

description   string  optional    

Auto-generated from validation rules for description. Example: Eius et animi quos velit et.

Update a card in a Card Game module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "description": "Eius et animi quos velit et."
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/card-game/cards/{cardId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

cardId   string     

Example: architecto

Body Parameters

name   string  optional    

Auto-generated from validation rules for name. Must not be greater than 255 characters. Example: b

description   string  optional    

Auto-generated from validation rules for description. Example: Eius et animi quos velit et.

Delete a card from a Card Game module.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/card-game/cards/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/program/{id}/structure/{structureId}/card-game/cards/{cardId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

cardId   string     

Example: architecto

List documents for an Upload Documents module.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/upload-documents

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Upload one or more documents to an Upload Documents module.

Single file: multipart field "file" (optional "original_name"). Multiple files: multipart field "files[]" (array of files).

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "original_name=b"\
    --form "file=@C:\Users\AMITB\AppData\Local\Temp\php3DA6.tmp" \
    --form "files[]=@C:\Users\AMITB\AppData\Local\Temp\php3DA7.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('original_name', 'b');
body.append('file', document.querySelector('input[name="file"]').files[0]);
body.append('files[]', document.querySelector('input[name="files[]"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/admin/program/{id}/structure/{structureId}/upload-documents

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

file   file  optional    

Auto-generated from validation rules for file. Must be a file. Must not be greater than 20480 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3DA6.tmp

files   file[]  optional    

Auto-generated from validation rules for files.*. Must be a file. Must not be greater than 20480 kilobytes.

original_name   string  optional    

Auto-generated from validation rules for original_name. Must not be greater than 255 characters. Example: b

Reorder documents in an Upload Documents module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/upload-documents/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*.

Reorder documents in an Upload Documents module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/upload-documents/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*.

Update a document (e.g. display name) in an Upload Documents module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"original_name\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "original_name": "b"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/upload-documents/{documentId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

documentId   string     

Example: architecto

Body Parameters

original_name   string  optional    

Auto-generated from validation rules for original_name. Must not be greater than 255 characters. Example: b

Update a document (e.g. display name) in an Upload Documents module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"original_name\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "original_name": "b"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/upload-documents/{documentId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

documentId   string     

Example: architecto

Body Parameters

original_name   string  optional    

Auto-generated from validation rules for original_name. Must not be greater than 255 characters. Example: b

Delete a document from an Upload Documents module.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/upload-documents/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/program/{id}/structure/{structureId}/upload-documents/{documentId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

documentId   string     

Example: architecto

List life elements for a Wheel of Life module.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Add a life element to a Wheel of Life module.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

name   string     

Auto-generated from validation rules for name. Must not be greater than 255 characters. Example: b

Reorder life elements in a Wheel of Life module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_wol_elements table.

Reorder life elements in a Wheel of Life module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_wol_elements table.

Update a life element in a Wheel of Life module.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements/{elementId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

Body Parameters

name   string     

Auto-generated from validation rules for name. Must not be greater than 255 characters. Example: b

Update a life element in a Wheel of Life module.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements/{elementId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

Body Parameters

name   string     

Auto-generated from validation rules for name. Must not be greater than 255 characters. Example: b

Delete a life element from a Wheel of Life module.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements/{elementId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

List questions for a Wheel of Life life element.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

Add a question to a Wheel of Life life element.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"single_choice\",
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "single_choice",
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

Body Parameters

type   string     

Auto-generated from validation rules for type. Example: single_choice

Must be one of:
  • descriptive
  • multi_choice
  • single_choice
  • dropdown
question_text   string     

Auto-generated from validation rules for question_text. Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Auto-generated from validation rules for options.*. Must not be greater than 500 characters.

Reorder questions in a Wheel of Life life element.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_wol_questions table.

Reorder questions in a Wheel of Life life element.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/reorder" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/reorder"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "order": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions/reorder

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

Body Parameters

order   integer[]  optional    

Auto-generated from validation rules for order.*. The id of an existing record in the program_structure_wol_questions table.

Update a question in a Wheel of Life life element.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"single_choice\",
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "single_choice",
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string     

Auto-generated from validation rules for type. Example: single_choice

Must be one of:
  • descriptive
  • multi_choice
  • single_choice
  • dropdown
question_text   string     

Auto-generated from validation rules for question_text. Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Auto-generated from validation rules for options.*. Must not be greater than 500 characters.

Update a question in a Wheel of Life life element.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"descriptive\",
    \"question_text\": \"b\",
    \"options\": [
        \"n\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "type": "descriptive",
    "question_text": "b",
    "options": [
        "n"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

type   string     

Auto-generated from validation rules for type. Example: descriptive

Must be one of:
  • descriptive
  • multi_choice
  • single_choice
  • dropdown
question_text   string     

Auto-generated from validation rules for question_text. Must not be greater than 2000 characters. Example: b

options   string[]  optional    

Auto-generated from validation rules for options.*. Must not be greater than 500 characters.

Delete a question from a Wheel of Life life element.

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/wheel-of-life/elements/architecto/questions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/program/{id}/structure/{structureId}/wheel-of-life/elements/{elementId}/questions/{questionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

questionId   string     

Example: architecto

Program-specific intermediate Values page – show.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-values" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-values"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/intermediate-values

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Program-specific intermediate Values page – update.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-values" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"b\",
    \"points\": [
        {
            \"id\": 16,
            \"description\": \"Et animi quos velit et fugiat.\",
            \"sort_order\": 42
        }
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-values"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "b",
    "points": [
        {
            "id": 16,
            "description": "Et animi quos velit et fugiat.",
            "sort_order": 42
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/intermediate-values

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

headline   string     

Auto-generated from validation rules for headline. Must not be greater than 255 characters. Example: b

points   object[]  optional    

Auto-generated from validation rules for points.

id   integer  optional    

Auto-generated from validation rules for points.*.id. The id of an existing record in the values_intermediate_points table. Example: 16

description   string  optional    

Auto-generated from validation rules for points.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for points.*.sort_order. Must be at least 0. Example: 42

Program-specific intermediate Values page – update.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-values" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"b\",
    \"points\": [
        {
            \"id\": 16,
            \"description\": \"Et animi quos velit et fugiat.\",
            \"sort_order\": 42
        }
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-values"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "b",
    "points": [
        {
            "id": 16,
            "description": "Et animi quos velit et fugiat.",
            "sort_order": 42
        }
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/intermediate-values

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

headline   string     

Auto-generated from validation rules for headline. Must not be greater than 255 characters. Example: b

points   object[]  optional    

Auto-generated from validation rules for points.

id   integer  optional    

Auto-generated from validation rules for points.*.id. The id of an existing record in the values_intermediate_points table. Example: 16

description   string  optional    

Auto-generated from validation rules for points.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for points.*.sort_order. Must be at least 0. Example: 42

Program-specific intermediate Eight most common mistakes page – show.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-eight-most-common-mistakes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-eight-most-common-mistakes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/intermediate-eight-most-common-mistakes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Program-specific intermediate Eight most common mistakes page – update.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-eight-most-common-mistakes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"b\",
    \"mistakes\": [
        {
            \"id\": 16,
            \"description\": \"Et animi quos velit et fugiat.\",
            \"sort_order\": 42
        }
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-eight-most-common-mistakes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "b",
    "mistakes": [
        {
            "id": 16,
            "description": "Et animi quos velit et fugiat.",
            "sort_order": 42
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/intermediate-eight-most-common-mistakes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

headline   string     

Auto-generated from validation rules for headline. Must not be greater than 255 characters. Example: b

mistakes   object[]  optional    

Auto-generated from validation rules for mistakes.

id   integer  optional    

Auto-generated from validation rules for mistakes.*.id. The id of an existing record in the eight_common_mistakes table. Example: 16

description   string  optional    

Auto-generated from validation rules for mistakes.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for mistakes.*.sort_order. Must be at least 0. Example: 42

Program-specific intermediate Eight most common mistakes page – update.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-eight-most-common-mistakes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"b\",
    \"mistakes\": [
        {
            \"id\": 16,
            \"description\": \"Et animi quos velit et fugiat.\",
            \"sort_order\": 42
        }
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-eight-most-common-mistakes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "b",
    "mistakes": [
        {
            "id": 16,
            "description": "Et animi quos velit et fugiat.",
            "sort_order": 42
        }
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/intermediate-eight-most-common-mistakes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

headline   string     

Auto-generated from validation rules for headline. Must not be greater than 255 characters. Example: b

mistakes   object[]  optional    

Auto-generated from validation rules for mistakes.

id   integer  optional    

Auto-generated from validation rules for mistakes.*.id. The id of an existing record in the eight_common_mistakes table. Example: 16

description   string  optional    

Auto-generated from validation rules for mistakes.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for mistakes.*.sort_order. Must be at least 0. Example: 42

Program-specific intermediate Goal Settings page – show.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-goal-settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-goal-settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/intermediate-goal-settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Program-specific intermediate Goal Settings page – update.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-goal-settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"b\",
    \"quote\": \"n\",
    \"sub_heading_1\": \"g\",
    \"sub_heading_2\": \"z\",
    \"description_2\": \"m\",
    \"options\": [
        {
            \"id\": 16,
            \"description\": \"Et animi quos velit et fugiat.\",
            \"sort_order\": 42
        }
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-goal-settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "b",
    "quote": "n",
    "sub_heading_1": "g",
    "sub_heading_2": "z",
    "description_2": "m",
    "options": [
        {
            "id": 16,
            "description": "Et animi quos velit et fugiat.",
            "sort_order": 42
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/intermediate-goal-settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

headline   string     

Auto-generated from validation rules for headline. Must not be greater than 255 characters. Example: b

quote   string  optional    

Auto-generated from validation rules for quote. Must not be greater than 500 characters. Example: n

sub_heading_1   string  optional    

Auto-generated from validation rules for sub_heading_1. Must not be greater than 255 characters. Example: g

sub_heading_2   string  optional    

Auto-generated from validation rules for sub_heading_2. Must not be greater than 255 characters. Example: z

description_2   string  optional    

Auto-generated from validation rules for description_2. Must not be greater than 10000 characters. Example: m

options   object[]  optional    

Auto-generated from validation rules for options.

id   integer  optional    

Auto-generated from validation rules for options.*.id. The id of an existing record in the goal_settings_intermediate_options table. Example: 16

description   string  optional    

Auto-generated from validation rules for options.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for options.*.sort_order. Must be at least 0. Example: 42

Program-specific intermediate Goal Settings page – update.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-goal-settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"b\",
    \"quote\": \"n\",
    \"sub_heading_1\": \"g\",
    \"sub_heading_2\": \"z\",
    \"description_2\": \"m\",
    \"options\": [
        {
            \"id\": 16,
            \"description\": \"Et animi quos velit et fugiat.\",
            \"sort_order\": 42
        }
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-goal-settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "b",
    "quote": "n",
    "sub_heading_1": "g",
    "sub_heading_2": "z",
    "description_2": "m",
    "options": [
        {
            "id": 16,
            "description": "Et animi quos velit et fugiat.",
            "sort_order": 42
        }
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/intermediate-goal-settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

headline   string     

Auto-generated from validation rules for headline. Must not be greater than 255 characters. Example: b

quote   string  optional    

Auto-generated from validation rules for quote. Must not be greater than 500 characters. Example: n

sub_heading_1   string  optional    

Auto-generated from validation rules for sub_heading_1. Must not be greater than 255 characters. Example: g

sub_heading_2   string  optional    

Auto-generated from validation rules for sub_heading_2. Must not be greater than 255 characters. Example: z

description_2   string  optional    

Auto-generated from validation rules for description_2. Must not be greater than 10000 characters. Example: m

options   object[]  optional    

Auto-generated from validation rules for options.

id   integer  optional    

Auto-generated from validation rules for options.*.id. The id of an existing record in the goal_settings_intermediate_options table. Example: 16

description   string  optional    

Auto-generated from validation rules for options.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for options.*.sort_order. Must be at least 0. Example: 42

Program-specific intermediate Questions Goal Why page – show.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-questions-goal-why" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-questions-goal-why"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/intermediate-questions-goal-why

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Program-specific intermediate Questions Goal Why page – update.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-questions-goal-why" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline_1\": \"b\",
    \"headline_2\": \"n\",
    \"headline_3\": \"g\",
    \"headline_4\": \"z\",
    \"headline_5\": \"m\",
    \"question_heading_1\": \"i\",
    \"question_description_1\": \"y\",
    \"question_heading_2\": \"v\",
    \"question_description_2\": \"d\",
    \"question_heading_3\": \"l\",
    \"question_description_3\": \"j\",
    \"quote\": \"n\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-questions-goal-why"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline_1": "b",
    "headline_2": "n",
    "headline_3": "g",
    "headline_4": "z",
    "headline_5": "m",
    "question_heading_1": "i",
    "question_description_1": "y",
    "question_heading_2": "v",
    "question_description_2": "d",
    "question_heading_3": "l",
    "question_description_3": "j",
    "quote": "n"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/intermediate-questions-goal-why

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

headline_1   string  optional    

Auto-generated from validation rules for headline_1. Must not be greater than 255 characters. Example: b

headline_2   string  optional    

Auto-generated from validation rules for headline_2. Must not be greater than 255 characters. Example: n

headline_3   string  optional    

Auto-generated from validation rules for headline_3. Must not be greater than 255 characters. Example: g

headline_4   string  optional    

Auto-generated from validation rules for headline_4. Must not be greater than 255 characters. Example: z

headline_5   string  optional    

Auto-generated from validation rules for headline_5. Must not be greater than 255 characters. Example: m

question_heading_1   string  optional    

Auto-generated from validation rules for question_heading_1. Must not be greater than 255 characters. Example: i

question_description_1   string  optional    

Auto-generated from validation rules for question_description_1. Must not be greater than 5000 characters. Example: y

question_heading_2   string  optional    

Auto-generated from validation rules for question_heading_2. Must not be greater than 255 characters. Example: v

question_description_2   string  optional    

Auto-generated from validation rules for question_description_2. Must not be greater than 5000 characters. Example: d

question_heading_3   string  optional    

Auto-generated from validation rules for question_heading_3. Must not be greater than 255 characters. Example: l

question_description_3   string  optional    

Auto-generated from validation rules for question_description_3. Must not be greater than 5000 characters. Example: j

quote   string  optional    

Auto-generated from validation rules for quote. Must not be greater than 2000 characters. Example: n

Program-specific intermediate Questions Goal Why page – update.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-questions-goal-why" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline_1\": \"b\",
    \"headline_2\": \"n\",
    \"headline_3\": \"g\",
    \"headline_4\": \"z\",
    \"headline_5\": \"m\",
    \"question_heading_1\": \"i\",
    \"question_description_1\": \"y\",
    \"question_heading_2\": \"v\",
    \"question_description_2\": \"d\",
    \"question_heading_3\": \"l\",
    \"question_description_3\": \"j\",
    \"quote\": \"n\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-questions-goal-why"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline_1": "b",
    "headline_2": "n",
    "headline_3": "g",
    "headline_4": "z",
    "headline_5": "m",
    "question_heading_1": "i",
    "question_description_1": "y",
    "question_heading_2": "v",
    "question_description_2": "d",
    "question_heading_3": "l",
    "question_description_3": "j",
    "quote": "n"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/intermediate-questions-goal-why

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

headline_1   string  optional    

Auto-generated from validation rules for headline_1. Must not be greater than 255 characters. Example: b

headline_2   string  optional    

Auto-generated from validation rules for headline_2. Must not be greater than 255 characters. Example: n

headline_3   string  optional    

Auto-generated from validation rules for headline_3. Must not be greater than 255 characters. Example: g

headline_4   string  optional    

Auto-generated from validation rules for headline_4. Must not be greater than 255 characters. Example: z

headline_5   string  optional    

Auto-generated from validation rules for headline_5. Must not be greater than 255 characters. Example: m

question_heading_1   string  optional    

Auto-generated from validation rules for question_heading_1. Must not be greater than 255 characters. Example: i

question_description_1   string  optional    

Auto-generated from validation rules for question_description_1. Must not be greater than 5000 characters. Example: y

question_heading_2   string  optional    

Auto-generated from validation rules for question_heading_2. Must not be greater than 255 characters. Example: v

question_description_2   string  optional    

Auto-generated from validation rules for question_description_2. Must not be greater than 5000 characters. Example: d

question_heading_3   string  optional    

Auto-generated from validation rules for question_heading_3. Must not be greater than 255 characters. Example: l

question_description_3   string  optional    

Auto-generated from validation rules for question_description_3. Must not be greater than 5000 characters. Example: j

quote   string  optional    

Auto-generated from validation rules for quote. Must not be greater than 2000 characters. Example: n

Program-specific intermediate Y Method page – show.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-y-method" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-y-method"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/program/{id}/structure/{structureId}/intermediate-y-method

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Program-specific intermediate Y Method page – update.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-y-method" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"b\",
    \"steps\": [
        {
            \"id\": 16,
            \"description\": \"Et animi quos velit et fugiat.\",
            \"sort_order\": 42
        }
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-y-method"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "b",
    "steps": [
        {
            "id": 16,
            "description": "Et animi quos velit et fugiat.",
            "sort_order": 42
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/program/{id}/structure/{structureId}/intermediate-y-method

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

headline   string     

Auto-generated from validation rules for headline. Must not be greater than 255 characters. Example: b

steps   object[]  optional    

Auto-generated from validation rules for steps.

id   integer  optional    

Auto-generated from validation rules for steps.*.id. The id of an existing record in the program_y_method_steps table. Example: 16

description   string  optional    

Auto-generated from validation rules for steps.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for steps.*.sort_order. Must be at least 0. Example: 42

Program-specific intermediate Y Method page – update.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-y-method" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"headline\": \"b\",
    \"steps\": [
        {
            \"id\": 16,
            \"description\": \"Et animi quos velit et fugiat.\",
            \"sort_order\": 42
        }
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-y-method"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "headline": "b",
    "steps": [
        {
            "id": 16,
            "description": "Et animi quos velit et fugiat.",
            "sort_order": 42
        }
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/program/{id}/structure/{structureId}/intermediate-y-method

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Body Parameters

headline   string     

Auto-generated from validation rules for headline. Must not be greater than 255 characters. Example: b

steps   object[]  optional    

Auto-generated from validation rules for steps.

id   integer  optional    

Auto-generated from validation rules for steps.*.id. The id of an existing record in the program_y_method_steps table. Example: 16

description   string  optional    

Auto-generated from validation rules for steps.*.description. Must not be greater than 5000 characters. Example: Et animi quos velit et fugiat.

sort_order   integer  optional    

Auto-generated from validation rules for steps.*.sort_order. Must be at least 0. Example: 42

Complete setup for an intermediate module: choose global vs specific.

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-steps/complete-setup" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/program/architecto/structure/architecto/intermediate-steps/complete-setup"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/admin/program/{id}/structure/{structureId}/intermediate-steps/complete-setup

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the program. Example: architecto

structureId   string     

Example: architecto

Admin - Payouts

GET api/v1/admin/payout

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/payout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/payout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/payout

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/payout/settings

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/payout/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/payout/settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/payout/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

PUT api/v1/admin/payout/settings

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/payout/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"global_commission_rate\": 1,
    \"payout_frequency\": \"14_days\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/payout/settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "global_commission_rate": 1,
    "payout_frequency": "14_days"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/payout/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

global_commission_rate   number  optional    

Auto-generated from validation rules for global_commission_rate. Must be at least 0. Must not be greater than 100. Example: 1

payout_frequency   string  optional    

Auto-generated from validation rules for payout_frequency. Example: 14_days

Must be one of:
  • 7_days
  • 14_days
  • monthly

PATCH api/v1/admin/payout/settings

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/payout/settings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"global_commission_rate\": 1,
    \"payout_frequency\": \"monthly\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/payout/settings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "global_commission_rate": 1,
    "payout_frequency": "monthly"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/payout/settings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

global_commission_rate   number  optional    

Auto-generated from validation rules for global_commission_rate. Must be at least 0. Must not be greater than 100. Example: 1

payout_frequency   string  optional    

Auto-generated from validation rules for payout_frequency. Example: monthly

Must be one of:
  • 7_days
  • 14_days
  • monthly

GET api/v1/admin/payout/{id}

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/payout/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/payout/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/payout/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the payout. Example: architecto

POST api/v1/admin/payout/{id}/status

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/payout/architecto/status" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "status=paid"\
    --form "transaction_number=b"\
    --form "payment_notes=n"\
    --form "payment_receipt=@C:\Users\AMITB\AppData\Local\Temp\php3C29.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/payout/architecto/status"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('status', 'paid');
body.append('transaction_number', 'b');
body.append('payment_notes', 'n');
body.append('payment_receipt', document.querySelector('input[name="payment_receipt"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/admin/payout/{id}/status

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the payout. Example: architecto

Body Parameters

status   string     

Auto-generated from validation rules for status. Example: paid

Must be one of:
  • unpaid
  • paid
transaction_number   string  optional    

Auto-generated from validation rules for transaction_number. Must not be greater than 120 characters. Example: b

payment_receipt   file  optional    

Auto-generated from validation rules for payment_receipt. Must be a file. Must not be greater than 4096 kilobytes. Example: C:\Users\AMITB\AppData\Local\Temp\php3C29.tmp

payment_notes   string  optional    

Auto-generated from validation rules for payment_notes. Must not be greater than 2000 characters. Example: n

Admin - Quote Management

APIs for managing quotes within quote categories. Only accessible by admin users. Each category has unlimited quotes. Admin provides quote text when creating.

All routes are prefixed with: /api/v1/admin/quote-category/quotes

Get list of quotes

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/quote-category/quotes?page=1&per_page=15&quote_category_id=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/quote-category/quotes"
);

const params = {
    "page": "1",
    "per_page": "15",
    "quote_category_id": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/quote-category/quotes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

quote_category_id   integer  optional    

optional Filter by quote category. Example: 1

Create a new quote

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/quote-category/quotes" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quote_category_id\": 1,
    \"quote\": \"The only way to do great work is to love what you do.\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/quote-category/quotes"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "quote_category_id": 1,
    "quote": "The only way to do great work is to love what you do."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/quote-category/quotes

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

quote_category_id   integer     

Quote category ID. Example: 1

quote   string     

The quote text. Example: The only way to do great work is to love what you do.

Get a specific quote

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/quote-category/quotes/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/quote-category/quotes/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/quote-category/quotes/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the quote. Example: 1

Update a quote

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/quote-category/quotes/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quote_category_id\": 16,
    \"quote\": \"architecto\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/quote-category/quotes/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "quote_category_id": 16,
    "quote": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/quote-category/quotes/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the quote. Example: 1

Body Parameters

quote_category_id   integer  optional    

optional Quote category ID. Example: 16

quote   string  optional    

optional The quote text. Example: architecto

Update a quote

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/quote-category/quotes/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quote_category_id\": 16,
    \"quote\": \"architecto\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/quote-category/quotes/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "quote_category_id": 16,
    "quote": "architecto"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/quote-category/quotes/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the quote. Example: 1

Body Parameters

quote_category_id   integer  optional    

optional Quote category ID. Example: 16

quote   string  optional    

optional The quote text. Example: architecto

Delete a quote

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/quote-category/quotes/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/quote-category/quotes/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/quote-category/quotes/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the quote. Example: 1

Admin - Quote Category Management

APIs for managing quote categories. Only accessible by admin users. Admin provides only the quote category name when creating.

All routes are prefixed with: /api/v1/admin/quote-category

Get list of quote categories (with quotes count)

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/quote-category?page=1&per_page=15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/quote-category"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/quote-category

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

Create a new quote category

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/quote-category" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Motivation\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/quote-category"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Motivation"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/quote-category

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

The quote category name. Example: Motivation

Get a specific quote category

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/quote-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/quote-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/quote-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the quote category. Example: 1

Update a quote category

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/quote-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"architecto\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/quote-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "architecto"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/quote-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the quote category. Example: 1

Body Parameters

name   string  optional    

optional The quote category name. Example: architecto

Update a quote category

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/quote-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"architecto\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/quote-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "architecto"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/quote-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the quote category. Example: 1

Body Parameters

name   string  optional    

optional The quote category name. Example: architecto

Delete a quote category

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/quote-category/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/quote-category/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/quote-category/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

The ID of the quote category. Example: 1

Admin - Shift Management

APIs for managing shifts (name, start time, end time) for working days. By default a shift is applied to all working days. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/shift

Day of week: 0=Sunday, 1=Monday, ..., 6=Saturday

Get list of all shifts

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/shift?page=1&per_page=15" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/shift"
);

const params = {
    "page": "1",
    "per_page": "15",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/shift

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

Create a new shift

By default the shift is applied to all working days. Pass working_days to restrict to specific days (0-6).

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/admin/shift" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Morning Shift\",
    \"start_time\": \"09:00\",
    \"end_time\": \"17:00\",
    \"working_days\": [
        1,
        2,
        3,
        4,
        5
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/shift"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Morning Shift",
    "start_time": "09:00",
    "end_time": "17:00",
    "working_days": [
        1,
        2,
        3,
        4,
        5
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/admin/shift

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Shift name. Example: Morning Shift

start_time   string     

Start time (HH:MM). Example: 09:00

end_time   string     

End time (HH:MM). Example: 17:00

working_days   string[]  optional    

optional Day numbers (0-6). Omit to apply to all working days.

Get a specific shift

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/shift/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/shift/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/shift/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the shift. Example: architecto

Update a shift

Pass working_days to set which days (0-6) the shift applies to. Omit to leave days unchanged.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/shift/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"start_time\": \"13:46\",
    \"end_time\": \"13:46\",
    \"working_days\": [
        4
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/shift/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "start_time": "13:46",
    "end_time": "13:46",
    "working_days": [
        4
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/admin/shift/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the shift. Example: architecto

Body Parameters

name   string  optional    

Auto-generated from validation rules for name. Must not be greater than 255 characters. Example: b

start_time   string  optional    

Auto-generated from validation rules for start_time. Must be a valid date in the format H:i. Example: 13:46

end_time   string  optional    

Auto-generated from validation rules for end_time. Must be a valid date in the format H:i. Example: 13:46

working_days   integer[]  optional    

Auto-generated from validation rules for working_days.*. Must be at least 0. Must not be greater than 6.

Update a shift

Pass working_days to set which days (0-6) the shift applies to. Omit to leave days unchanged.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/shift/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"start_time\": \"13:46\",
    \"end_time\": \"13:46\",
    \"working_days\": [
        4
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/shift/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "b",
    "start_time": "13:46",
    "end_time": "13:46",
    "working_days": [
        4
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/admin/shift/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the shift. Example: architecto

Body Parameters

name   string  optional    

Auto-generated from validation rules for name. Must not be greater than 255 characters. Example: b

start_time   string  optional    

Auto-generated from validation rules for start_time. Must be a valid date in the format H:i. Example: 13:46

end_time   string  optional    

Auto-generated from validation rules for end_time. Must be a valid date in the format H:i. Example: 13:46

working_days   integer[]  optional    

Auto-generated from validation rules for working_days.*. Must be at least 0. Must not be greater than 6.

Delete a shift

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/admin/shift/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/shift/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/admin/shift/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the shift. Example: architecto

Shifts (Public)

Public API for reading shifts. No authentication required.

All routes are prefixed with: /api/v1/shift

Day of week: 0=Sunday, 1=Monday, ..., 6=Saturday

List shifts

Returns all shifts with their name, start/end time and working day numbers. Optionally filter by day_of_week (0-6) to get shifts that apply to that day.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/shift?page=1&per_page=15&day_of_week=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/shift"
);

const params = {
    "page": "1",
    "per_page": "15",
    "day_of_week": "1",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": true,
    "message": "Shifts retrieved successfully",
    "data": {
        "current_page": 1,
        "data": [],
        "first_page_url": "https://ruhline-api.test/api/v1/shift?page=1",
        "from": null,
        "last_page": 1,
        "last_page_url": "https://ruhline-api.test/api/v1/shift?page=1",
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "page": null,
                "active": false
            },
            {
                "url": "https://ruhline-api.test/api/v1/shift?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "page": null,
                "active": false
            }
        ],
        "next_page_url": null,
        "path": "https://ruhline-api.test/api/v1/shift",
        "per_page": 15,
        "prev_page_url": null,
        "to": null,
        "total": 0
    }
}
 

Request      

GET api/v1/shift

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

page   integer  optional    

The page number. Example: 1

per_page   integer  optional    

Number of items per page. Example: 15

day_of_week   integer  optional    

Filter shifts that apply to this day (0=Sunday..6=Saturday). Example: 1

Get a single shift

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/shift/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/shift/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Server Error"
}
 

Request      

GET api/v1/shift/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the shift. Example: architecto

Admin - Site Settings (CMS)

APIs for managing site settings. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/site-setting

Get site settings (admin)

Returns the current site settings for editing.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/site-setting" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/site-setting"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/site-setting

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Update site settings

Update site settings. All fields are optional; only provided fields are updated. Image fields accept file uploads; text/URL fields accept strings.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/site-setting" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "footer_description=Your fitness partner."\
    --form "copyright=© 2026 Company Name"\
    --form "facebook_url=https://facebook.com/..."\
    --form "instagram_url=https://instagram.com/..."\
    --form "linkedin_url=https://linkedin.com/..."\
    --form "address_line_1=123 Main St"\
    --form "address_line_2=Suite 100"\
    --form "landmark=Near Central Park"\
    --form "country_id=1"\
    --form "state_id=1"\
    --form "city_id=1"\
    --form "zipcode=10001"\
    --form "global_commission_rate=10.5"\
    --form "payout_frequency=14_days"\
    --form "favicon=@C:\Users\AMITB\AppData\Local\Temp\php4213.tmp" \
    --form "header_logo=@C:\Users\AMITB\AppData\Local\Temp\php4214.tmp" \
    --form "page_header_image=@C:\Users\AMITB\AppData\Local\Temp\php4215.tmp" \
    --form "footer_logo=@C:\Users\AMITB\AppData\Local\Temp\php4216.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/site-setting"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('footer_description', 'Your fitness partner.');
body.append('copyright', '© 2026 Company Name');
body.append('facebook_url', 'https://facebook.com/...');
body.append('instagram_url', 'https://instagram.com/...');
body.append('linkedin_url', 'https://linkedin.com/...');
body.append('address_line_1', '123 Main St');
body.append('address_line_2', 'Suite 100');
body.append('landmark', 'Near Central Park');
body.append('country_id', '1');
body.append('state_id', '1');
body.append('city_id', '1');
body.append('zipcode', '10001');
body.append('global_commission_rate', '10.5');
body.append('payout_frequency', '14_days');
body.append('favicon', document.querySelector('input[name="favicon"]').files[0]);
body.append('header_logo', document.querySelector('input[name="header_logo"]').files[0]);
body.append('page_header_image', document.querySelector('input[name="page_header_image"]').files[0]);
body.append('footer_logo', document.querySelector('input[name="footer_logo"]').files[0]);

fetch(url, {
    method: "PUT",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{"success":true,"message":"Site settings updated successfully","data":{...}}
 

Example response (422):


{"success":false,"message":"Validation failed","errors":{...}}
 

Request      

PUT api/v1/admin/site-setting

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

favicon   file  optional    

optional Favicon image (ico, png, jpg, gif, svg). Example: C:\Users\AMITB\AppData\Local\Temp\php4213.tmp

header_logo   file  optional    

optional Header logo image. Example: C:\Users\AMITB\AppData\Local\Temp\php4214.tmp

page_header_image   file  optional    

optional Page header image. Example: C:\Users\AMITB\AppData\Local\Temp\php4215.tmp

footer_logo   file  optional    

optional Footer logo image. Example: C:\Users\AMITB\AppData\Local\Temp\php4216.tmp

footer_description   string  optional    

optional Footer description text. Example: Your fitness partner.

copyright   string  optional    

optional Copyright text. Example: © 2026 Company Name

facebook_url   string  optional    

optional Facebook profile URL. Example: https://facebook.com/...

instagram_url   string  optional    

optional Instagram profile URL. Example: https://instagram.com/...

linkedin_url   string  optional    

optional LinkedIn profile URL. Example: https://linkedin.com/...

address_line_1   string  optional    

optional Address line 1. Example: 123 Main St

address_line_2   string  optional    

optional Address line 2. Example: Suite 100

landmark   string  optional    

optional Landmark. Example: Near Central Park

country_id   integer  optional    

optional Country ID (from countries table). Example: 1

state_id   integer  optional    

optional State ID (from states table). Example: 1

city_id   integer  optional    

optional City ID (from cities table). Example: 1

zipcode   string  optional    

optional Zip/Postal code. Example: 10001

global_commission_rate   number  optional    

optional Global commission rate for coaches (0-100%). Example: 10.5

payout_frequency   string  optional    

Auto-generated from validation rules for payout_frequency. Example: 14_days

Must be one of:
  • 7_days
  • 14_days
  • monthly

Update site settings

Update site settings. All fields are optional; only provided fields are updated. Image fields accept file uploads; text/URL fields accept strings.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/site-setting" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "footer_description=Your fitness partner."\
    --form "copyright=© 2026 Company Name"\
    --form "facebook_url=https://facebook.com/..."\
    --form "instagram_url=https://instagram.com/..."\
    --form "linkedin_url=https://linkedin.com/..."\
    --form "address_line_1=123 Main St"\
    --form "address_line_2=Suite 100"\
    --form "landmark=Near Central Park"\
    --form "country_id=1"\
    --form "state_id=1"\
    --form "city_id=1"\
    --form "zipcode=10001"\
    --form "global_commission_rate=10.5"\
    --form "payout_frequency=14_days"\
    --form "favicon=@C:\Users\AMITB\AppData\Local\Temp\php422A.tmp" \
    --form "header_logo=@C:\Users\AMITB\AppData\Local\Temp\php422B.tmp" \
    --form "page_header_image=@C:\Users\AMITB\AppData\Local\Temp\php422C.tmp" \
    --form "footer_logo=@C:\Users\AMITB\AppData\Local\Temp\php422D.tmp" 
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/site-setting"
);

const headers = {
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('footer_description', 'Your fitness partner.');
body.append('copyright', '© 2026 Company Name');
body.append('facebook_url', 'https://facebook.com/...');
body.append('instagram_url', 'https://instagram.com/...');
body.append('linkedin_url', 'https://linkedin.com/...');
body.append('address_line_1', '123 Main St');
body.append('address_line_2', 'Suite 100');
body.append('landmark', 'Near Central Park');
body.append('country_id', '1');
body.append('state_id', '1');
body.append('city_id', '1');
body.append('zipcode', '10001');
body.append('global_commission_rate', '10.5');
body.append('payout_frequency', '14_days');
body.append('favicon', document.querySelector('input[name="favicon"]').files[0]);
body.append('header_logo', document.querySelector('input[name="header_logo"]').files[0]);
body.append('page_header_image', document.querySelector('input[name="page_header_image"]').files[0]);
body.append('footer_logo', document.querySelector('input[name="footer_logo"]').files[0]);

fetch(url, {
    method: "PATCH",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{"success":true,"message":"Site settings updated successfully","data":{...}}
 

Example response (422):


{"success":false,"message":"Validation failed","errors":{...}}
 

Request      

PATCH api/v1/admin/site-setting

Headers

Content-Type        

Example: multipart/form-data

Accept        

Example: application/json

Body Parameters

favicon   file  optional    

optional Favicon image (ico, png, jpg, gif, svg). Example: C:\Users\AMITB\AppData\Local\Temp\php422A.tmp

header_logo   file  optional    

optional Header logo image. Example: C:\Users\AMITB\AppData\Local\Temp\php422B.tmp

page_header_image   file  optional    

optional Page header image. Example: C:\Users\AMITB\AppData\Local\Temp\php422C.tmp

footer_logo   file  optional    

optional Footer logo image. Example: C:\Users\AMITB\AppData\Local\Temp\php422D.tmp

footer_description   string  optional    

optional Footer description text. Example: Your fitness partner.

copyright   string  optional    

optional Copyright text. Example: © 2026 Company Name

facebook_url   string  optional    

optional Facebook profile URL. Example: https://facebook.com/...

instagram_url   string  optional    

optional Instagram profile URL. Example: https://instagram.com/...

linkedin_url   string  optional    

optional LinkedIn profile URL. Example: https://linkedin.com/...

address_line_1   string  optional    

optional Address line 1. Example: 123 Main St

address_line_2   string  optional    

optional Address line 2. Example: Suite 100

landmark   string  optional    

optional Landmark. Example: Near Central Park

country_id   integer  optional    

optional Country ID (from countries table). Example: 1

state_id   integer  optional    

optional State ID (from states table). Example: 1

city_id   integer  optional    

optional City ID (from cities table). Example: 1

zipcode   string  optional    

optional Zip/Postal code. Example: 10001

global_commission_rate   number  optional    

optional Global commission rate for coaches (0-100%). Example: 10.5

payout_frequency   string  optional    

Auto-generated from validation rules for payout_frequency. Example: 14_days

Must be one of:
  • 7_days
  • 14_days
  • monthly

Site Settings (Public)

Public APIs for retrieving site settings (logos, footer, social links, address). No authentication required.

Routes are prefixed with: /api/v1/site-setting

Get site settings

Returns the current site settings for the frontend (favicon, logos, footer, social links, address).

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/site-setting" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/site-setting"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Site settings retrieved successfully",
    "data": {
        "id": 1,
        "favicon": "http://localhost/storage/favicon.ico",
        "header_logo": "http://localhost/storage/site/header-logo.png",
        "page_header_image": "http://localhost/storage/site/page-header.jpg",
        "footer_logo": "http://localhost/storage/site/footer-logo.png",
        "footer_description": "Your fitness partner.",
        "copyright": "© 2026 Company Name",
        "social_media": {
            "facebook_url": "https://facebook.com/...",
            "instagram_url": "https://instagram.com/...",
            "linkedin_url": "https://linkedin.com/..."
        },
        "address": {
            "address_line_1": "123 Main St",
            "address_line_2": "Suite 100",
            "landmark": "Near Central Park",
            "city": "New York",
            "state": "NY",
            "country": "USA",
            "zipcode": "10001"
        },
        "updated_at": "2026-02-04T10:00:00+00:00"
    }
}
 

Example response (404):


{
    "success": false,
    "message": "Site settings not found."
}
 

Request      

GET api/v1/site-setting

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Admin - Working Days Management

APIs for managing which week days are working days. Only accessible by admin users.

All routes are prefixed with: /api/v1/admin/working-day

Day of week: 0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday

Get working days configuration

Returns all seven week days with their working/non-working status.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/working-day" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/working-day"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Working days retrieved successfully",
    "data": {
        "days": [
            {
                "id": 1,
                "day_of_week": 0,
                "day_name": "Sunday",
                "is_working": false,
                "updated_at": "2026-01-29T12:00:00+00:00"
            },
            {
                "id": 2,
                "day_of_week": 1,
                "day_name": "Monday",
                "is_working": true,
                "updated_at": "2026-01-29T12:00:00+00:00"
            }
        ],
        "working_day_numbers": [
            1,
            2,
            3,
            4,
            5
        ]
    }
}
 

Request      

GET api/v1/admin/working-day

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Update working days

Mark which week days are working. Send an array of day numbers (0-6) that should be working; all others will be set to non-working.

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/admin/working-day" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"working_days\": [
        1,
        2,
        3,
        4,
        5
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/working-day"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "working_days": [
        1,
        2,
        3,
        4,
        5
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{"success":true,"message":"Working days updated successfully","data":{"days":[...],"working_day_numbers":[1,2,3,4,5]}}
 

Example response (422):


{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "working_days": [
            "At least one day selection is required."
        ]
    }
}
 

Request      

PUT api/v1/admin/working-day

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

working_days   string[]     

Array of day-of-week numbers (0=Sunday .. 6=Saturday) that are working days.

Update working days

Mark which week days are working. Send an array of day numbers (0-6) that should be working; all others will be set to non-working.

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/admin/working-day" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"working_days\": [
        1,
        2,
        3,
        4,
        5
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/working-day"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "working_days": [
        1,
        2,
        3,
        4,
        5
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{"success":true,"message":"Working days updated successfully","data":{"days":[...],"working_day_numbers":[1,2,3,4,5]}}
 

Example response (422):


{
    "success": false,
    "message": "Validation failed",
    "errors": {
        "working_days": [
            "At least one day selection is required."
        ]
    }
}
 

Request      

PATCH api/v1/admin/working-day

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

working_days   string[]     

Array of day-of-week numbers (0=Sunday .. 6=Saturday) that are working days.

Working Days (Public)

Public API for reading which week days are working days and their shifts. No authentication required.

All routes are prefixed with: /api/v1/working-day

Day of week: 0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday

Get working days configuration with shifts

Returns all seven week days with their working/non-working status and the shifts that apply to each day. No auth required.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/working-day" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/working-day"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Working days retrieved successfully",
    "data": {
        "days": [
            {
                "id": 1,
                "day_of_week": 0,
                "day_name": "Sunday",
                "is_working": false,
                "updated_at": "...",
                "shifts": []
            },
            {
                "id": 2,
                "day_of_week": 1,
                "day_name": "Monday",
                "is_working": true,
                "updated_at": "...",
                "shifts": [
                    {
                        "id": 1,
                        "name": "Morning",
                        "start_time": "09:00",
                        "end_time": "17:00",
                        "working_day_numbers": [
                            1,
                            2,
                            3,
                            4,
                            5
                        ],
                        "created_at": "...",
                        "updated_at": "..."
                    }
                ]
            }
        ],
        "working_day_numbers": [
            1,
            2,
            3,
            4,
            5
        ]
    }
}
 

Request      

GET api/v1/working-day

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Example Routes

Example routes demonstrating role-based access control. These are sample endpoints showing how different user roles can access different resources.

Admin Dashboard

requires authentication

Get admin dashboard data. This endpoint is protected and requires admin role.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin-only/dashboard" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin-only/dashboard"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Admin dashboard data",
    "data": {
        "admin": true
    }
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Example response (403):


{
    "success": false,
    "message": "Forbidden - Admin access required"
}
 

Request      

GET api/v1/admin-only/dashboard

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Staff Dashboard

requires authentication

Get staff dashboard data. This endpoint is protected and requires staff role.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/staff-only/dashboard" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/staff-only/dashboard"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Staff dashboard data",
    "data": {
        "staff": true
    }
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Example response (403):


{
    "success": false,
    "message": "Forbidden - Staff access required"
}
 

Request      

GET api/v1/staff-only/dashboard

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Coach Dashboard

requires authentication

Get coach dashboard data. This endpoint is protected and requires coach role.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/coach-only/dashboard" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/coach-only/dashboard"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Coach dashboard data",
    "data": {
        "coach": true
    }
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Example response (403):


{
    "success": false,
    "message": "Forbidden - Coach access required"
}
 

Request      

GET api/v1/coach-only/dashboard

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Customer Dashboard

requires authentication

Get customer dashboard data. This endpoint is protected and requires customer role.

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer-only/dashboard" \
    --header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer-only/dashboard"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Customer dashboard data",
    "data": {
        "customer": true
    }
}
 

Example response (401):


{
    "success": false,
    "message": "Unauthenticated"
}
 

Example response (403):


{
    "success": false,
    "message": "Forbidden - Customer access required"
}
 

Request      

GET api/v1/customer-only/dashboard

Headers

Authorization        

Example: Bearer {YOUR_AUTH_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Admin - Orders

GET api/v1/admin/orders

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/orders" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/orders"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/orders

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

GET api/v1/admin/orders/{id}

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/admin/orders/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/admin/orders/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/admin/orders/{id}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   string     

The ID of the order. Example: architecto

Coach - Enrollment Module Access

GET api/v1/program/enrollments/{enrollmentId}/modules

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/enrollments/{enrollmentId}/modules

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

PATCH api/v1/program/enrollments/{enrollmentId}/modules

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"modules\": [
        {
            \"program_structure_id\": 16,
            \"is_locked\": true
        }
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "modules": [
        {
            "program_structure_id": 16,
            "is_locked": true
        }
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/enrollments/{enrollmentId}/modules

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

Body Parameters

modules   object[]     

Must have at least 1 items.

program_structure_id   integer     

Example: 16

is_locked   boolean     

Example: true

PUT api/v1/program/enrollments/{enrollmentId}/modules/{structureId}

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"is_locked\": true
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "is_locked": true
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/program/enrollments/{enrollmentId}/modules/{structureId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

is_locked   boolean     

Example: true

PATCH api/v1/program/enrollments/{enrollmentId}/modules/{structureId}

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"is_locked\": true
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "is_locked": true
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/program/enrollments/{enrollmentId}/modules/{structureId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

is_locked   boolean     

Example: true

Customer - Enrollment Card Game

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/state

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/state" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/state"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/state

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/question-sets/{setId}/questions

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/question-sets/architecto/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/question-sets/architecto/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/question-sets/{setId}/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/question-sets/{setId}/questions/{questionId}/answer

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/question-sets/architecto/questions/architecto/answer" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"answer_text\": \"b\",
    \"answer_option\": \"n\",
    \"answer_options\": [
        \"g\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/question-sets/architecto/questions/architecto/answer"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "answer_text": "b",
    "answer_option": "n",
    "answer_options": [
        "g"
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/question-sets/{setId}/questions/{questionId}/answer

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

answer_text   string  optional    

Must not be greater than 10000 characters. Example: b

answer_option   string  optional    

Must not be greater than 1000 characters. Example: n

answer_options   string[]  optional    

Must not be greater than 1000 characters.

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/question-sets/{setId}/questions/{questionId}/answer

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/question-sets/architecto/questions/architecto/answer" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"answer_text\": \"b\",
    \"answer_option\": \"n\",
    \"answer_options\": [
        \"g\"
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/question-sets/architecto/questions/architecto/answer"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "answer_text": "b",
    "answer_option": "n",
    "answer_options": [
        "g"
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/question-sets/{setId}/questions/{questionId}/answer

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

questionId   string     

Example: architecto

Body Parameters

answer_text   string  optional    

Must not be greater than 10000 characters. Example: b

answer_option   string  optional    

Must not be greater than 1000 characters. Example: n

answer_options   string[]  optional    

Must not be greater than 1000 characters.

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/question-sets/{setId}/card-selection

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/question-sets/architecto/card-selection" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"card_snapshot_ids\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/question-sets/architecto/card-selection"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "card_snapshot_ids": [
        16
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/question-sets/{setId}/card-selection

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

Body Parameters

card_snapshot_ids   integer[]  optional    

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/question-sets/{setId}/card-selection

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/question-sets/architecto/card-selection" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"card_snapshot_ids\": [
        16
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/question-sets/architecto/card-selection"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "card_snapshot_ids": [
        16
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/question-sets/{setId}/card-selection

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

setId   string     

Example: architecto

Body Parameters

card_snapshot_ids   integer[]  optional    

POST api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/submit

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/submit" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/card-game/submit"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/card-game/submit

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

Customer - Enrollment Find Your Motivation

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/find-your-motivation/words

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/find-your-motivation/words" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/find-your-motivation/words"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/find-your-motivation/words

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/find-your-motivation/words/{wordId}/guess

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/find-your-motivation/words/architecto/guess" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"guess_word\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/find-your-motivation/words/architecto/guess"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "guess_word": "b"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/find-your-motivation/words/{wordId}/guess

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

wordId   string     

Example: architecto

Body Parameters

guess_word   string     

Must not be greater than 255 characters. Example: b

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/find-your-motivation/words/{wordId}/guess

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/find-your-motivation/words/architecto/guess" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"guess_word\": \"b\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/find-your-motivation/words/architecto/guess"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "guess_word": "b"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/find-your-motivation/words/{wordId}/guess

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

wordId   string     

Example: architecto

Body Parameters

guess_word   string     

Must not be greater than 255 characters. Example: b

Customer - Enrollment Goal Settings

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

POST api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

goalId   string     

Example: architecto

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

goalId   string     

Example: architecto

DELETE api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

goalId   string     

Example: architecto

POST api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}/sub-goals

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto/sub-goals" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto/sub-goals"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}/sub-goals

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

goalId   string     

Example: architecto

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}/sub-goals/{subGoalId}

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto/sub-goals/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto/sub-goals/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}/sub-goals/{subGoalId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

goalId   string     

Example: architecto

subGoalId   string     

Example: architecto

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}/sub-goals/{subGoalId}

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto/sub-goals/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto/sub-goals/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}/sub-goals/{subGoalId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

goalId   string     

Example: architecto

subGoalId   string     

Example: architecto

DELETE api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}/sub-goals/{subGoalId}

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto/sub-goals/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/goal-settings/goals/architecto/sub-goals/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/goal-settings/goals/{goalId}/sub-goals/{subGoalId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

goalId   string     

Example: architecto

subGoalId   string     

Example: architecto

Customer - Enrollment Habit Tracker

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/habit-tracker/state

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/habit-tracker/state" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/habit-tracker/state"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/habit-tracker/state

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

POST api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/habit-tracker/habits

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/habit-tracker/habits" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/habit-tracker/habits"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/habit-tracker/habits

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/habit-tracker/habits/{habitId}

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/habit-tracker/habits/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/habit-tracker/habits/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/habit-tracker/habits/{habitId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

habitId   string     

Example: architecto

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/habit-tracker/habits/{habitId}

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/habit-tracker/habits/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/habit-tracker/habits/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/habit-tracker/habits/{habitId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

habitId   string     

Example: architecto

DELETE api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/habit-tracker/habits/{habitId}

Example request:
curl --request DELETE \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/habit-tracker/habits/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/habit-tracker/habits/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/habit-tracker/habits/{habitId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

habitId   string     

Example: architecto

Customer - Enrollment Modules

GET api/v1/customer/enrollments/{enrollmentId}/modules

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/modules

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

Customer - Enrollment Questions

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/values/questions

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/values/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/values/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/values/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/values/questions/{questionId}/answer

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/values/questions/architecto/answer" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/values/questions/architecto/answer"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/values/questions/{questionId}/answer

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/values/questions/{questionId}/answer

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/values/questions/architecto/answer" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/values/questions/architecto/answer"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/values/questions/{questionId}/answer

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/who-am-i/questions

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/who-am-i/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/who-am-i/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/who-am-i/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/who-am-i/questions/{questionId}/answer

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/who-am-i/questions/architecto/answer" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/who-am-i/questions/architecto/answer"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/who-am-i/questions/{questionId}/answer

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/who-am-i/questions/{questionId}/answer

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/who-am-i/questions/architecto/answer" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/who-am-i/questions/architecto/answer"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/who-am-i/questions/{questionId}/answer

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

questionId   string     

Example: architecto

Customer - Enrollment Upload Documents

GET api/v1/customer/enrollments/{enrollmentId}/resources/upload-documents

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/resources/upload-documents" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/resources/upload-documents"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/resources/upload-documents

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/upload-documents/resources

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/upload-documents/resources" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/upload-documents/resources"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/upload-documents/resources

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

Customer - Enrollment Wheel Of Life

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/elements

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/wheel-of-life/elements" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/wheel-of-life/elements"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/elements

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/ratings

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/wheel-of-life/ratings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ratings\": [
        {
            \"element_id\": 16,
            \"id\": 16,
            \"source_element_id\": 16,
            \"rating\": 16
        }
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/wheel-of-life/ratings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ratings": [
        {
            "element_id": 16,
            "id": 16,
            "source_element_id": 16,
            "rating": 16
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/ratings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

ratings   object[]     

Must have at least 1 items.

element_id   integer  optional    

Example: 16

id   integer  optional    

Example: 16

source_element_id   integer  optional    

Example: 16

rating   integer     

Example: 16

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/ratings

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/wheel-of-life/ratings" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ratings\": [
        {
            \"element_id\": 16,
            \"id\": 16,
            \"source_element_id\": 16,
            \"rating\": 16
        }
    ]
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/wheel-of-life/ratings"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ratings": [
        {
            "element_id": 16,
            "id": 16,
            "source_element_id": 16,
            "rating": 16
        }
    ]
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/ratings

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

Body Parameters

ratings   object[]     

Must have at least 1 items.

element_id   integer  optional    

Example: 16

id   integer  optional    

Example: 16

source_element_id   integer  optional    

Example: 16

rating   integer     

Example: 16

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/elements/{elementId}/questions

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/wheel-of-life/elements/architecto/questions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/wheel-of-life/elements/architecto/questions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/elements/{elementId}/questions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/elements/{elementId}/questions/{questionId}/answer

Example request:
curl --request PUT \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/wheel-of-life/elements/architecto/questions/architecto/answer" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/wheel-of-life/elements/architecto/questions/architecto/answer"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/elements/{elementId}/questions/{questionId}/answer

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

questionId   string     

Example: architecto

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/elements/{elementId}/questions/{questionId}/answer

Example request:
curl --request PATCH \
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/wheel-of-life/elements/architecto/questions/architecto/answer" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/customer/enrollments/architecto/modules/architecto/wheel-of-life/elements/architecto/questions/architecto/answer"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "PATCH",
    headers,
}).then(response => response.json());

Request      

PATCH api/v1/customer/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/elements/{elementId}/questions/{questionId}/answer

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

elementId   string     

Example: architecto

questionId   string     

Example: architecto

Endpoints

GET api/v1/program/sessions/calendar

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/sessions/calendar" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"from\": \"2026-07-07\",
    \"to\": \"2052-07-30\",
    \"timezone\": \"Asia\\/Ulaanbaatar\"
}"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/sessions/calendar"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "from": "2026-07-07",
    "to": "2052-07-30",
    "timezone": "Asia\/Ulaanbaatar"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/sessions/calendar

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

from   string  optional    

Must be a valid date in the format Y-m-d. Example: 2026-07-07

to   string  optional    

Must be a valid date in the format Y-m-d. Must be a date after or equal to from. Example: 2052-07-30

timezone   string  optional    

Must be a valid time zone, such as Africa/Accra. Example: Asia/Ulaanbaatar

GET api/v1/program/enrollments/{enrollmentId}/sessions

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/enrollments/architecto/sessions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/sessions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/enrollments/{enrollmentId}/sessions

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

GET api/v1/program/enrollments/{enrollmentId}/sessions/{sessionId}

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/enrollments/architecto/sessions/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/sessions/architecto"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/enrollments/{enrollmentId}/sessions/{sessionId}

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

sessionId   string     

Example: architecto

POST api/v1/program/enrollments/{enrollmentId}/sessions/{sessionId}/video-token

Example request:
curl --request POST \
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/sessions/architecto/video-token" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/sessions/architecto/video-token"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/program/enrollments/{enrollmentId}/sessions/{sessionId}/video-token

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

sessionId   string     

Example: architecto

GET api/v1/program/enrollments/{enrollmentId}/modules/{structureId}/values/responses

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto/values/responses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto/values/responses"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/enrollments/{enrollmentId}/modules/{structureId}/values/responses

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

GET api/v1/program/enrollments/{enrollmentId}/modules/{structureId}/who-am-i/responses

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto/who-am-i/responses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto/who-am-i/responses"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/enrollments/{enrollmentId}/modules/{structureId}/who-am-i/responses

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

GET api/v1/program/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/responses

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto/wheel-of-life/responses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto/wheel-of-life/responses"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/enrollments/{enrollmentId}/modules/{structureId}/wheel-of-life/responses

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

GET api/v1/program/enrollments/{enrollmentId}/modules/{structureId}/find-your-motivation/responses

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto/find-your-motivation/responses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto/find-your-motivation/responses"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/enrollments/{enrollmentId}/modules/{structureId}/find-your-motivation/responses

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto

GET api/v1/program/enrollments/{enrollmentId}/modules/{structureId}/card-game/responses

Example request:
curl --request GET \
    --get "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto/card-game/responses" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://ruhline-api.test/api/v1/program/enrollments/architecto/modules/architecto/card-game/responses"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};


fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "success": false,
    "message": "Unauthenticated"
}
 

Request      

GET api/v1/program/enrollments/{enrollmentId}/modules/{structureId}/card-game/responses

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

enrollmentId   string     

Example: architecto

structureId   string     

Example: architecto