Preloader Close

Revolutionary Products For Industrial Engineering

  • Call Us Today

    (934) 256 7850

  • Working Hours

    Mon - Fri: 9 am to 6 pm

  • 950 Zalpaca Avenue

    Virginia, 32809

Industries

List of Industries

JDStudents Industries API

Base URL

All requests go to:

https://jdstudents.com/api/industries.php

What this API returns

Each Industry object looks like:

{
  "id": "1",
  "name": "Technology",
  "short_info": "Software, AI, Cloud",
  "description": "All tech-related fields.",
  "sort_order": "1",
  "is_active": "1",
  "created_at": "2025-12-09 10:00:00",
  "updated_at": "2025-12-09 10:00:00"
}

Endpoints (Very Simple)

Action Method URL Example
List all industries GET /api/industries.php
List active industries only GET /api/industries.php?active=1
Get one industry GET /api/industries.php?id=1
Create new industry POST /api/industries.php
Update industry (easy external way) POST /api/industries.php?action=update&id=1
Update industry (REST style) PUT /api/industries.php?id=1
Delete industry DELETE /api/industries.php?id=3

How to connect from your website (JavaScript)

Put this inside your index.html:

<div id="industries-list"></div>

<script>
async function loadIndustries(){
  // 1) Call API
  const res = await fetch('/api/industries.php?active=1');

  // 2) Convert response to JSON
  const json = await res.json();

  // 3) Check success
  if(!json.ok) {
    console.log("API error:", json);
    return;
  }

  // 4) Render on page
  const box = document.getElementById('industries-list');
  box.innerHTML = '';

  json.data.forEach(i => {
    const div = document.createElement('div');
    div.innerHTML = `<h3>${i.name}</h3><p>${i.short_info ?? ''}</p>`;
    box.appendChild(div);
  });
}

document.addEventListener('DOMContentLoaded', loadIndustries);
</script>

External app usage (cURL examples)

1) Read active list

curl "https://jdstudents.com/api/industries.php?active=1"

2) Create new industry

curl -X POST "https://jdstudents.com/api/industries.php" \
  -H "Content-Type: application/json" \
  -d '{
    "name":"Education",
    "short_info":"Universities, schools, edtech",
    "description":"Learning and training services.",
    "sort_order":4,
    "is_active":1
  }'

3) Update using URL + POST (recommended for outside apps)

curl -X POST "https://jdstudents.com/api/industries.php?action=update&id=1" \
  -d "name=Technology" \
  -d "short_info=Software, AI, Cloud, Cybersecurity" \
  -d "description=All tech fields and careers" \
  -d "sort_order=1" \
  -d "is_active=1"

4) Update using PUT (REST style)

curl -X PUT "https://jdstudents.com/api/industries.php?id=1" \
  -H "Content-Type: application/json" \
  -d '{"short_info":"Updated info","sort_order":1}'

5) Delete

curl -X DELETE "https://jdstudents.com/api/industries.php?id=3"

Success & error format

Success

{
  "ok": true,
  "data": [...]
}

Error

{
  "ok": false,
  "error": "Message here"
}