Gantt Chart & Critical Path API

Tasks in JSON, CSV or Excel → schedule on working days (Vietnamese holidays), FS / SS / FF / SF links, critical path, Gantt chart as SVG, PNG or PDF.

GETPOSThttps://apibox.io.vn/v1/gantt-chart
Images & Codes▶ Try it online

Send tasks (JSON array), csv (header row) or an Excel file. Each task has an id, name, either duration (working days) or start + end, optional start constraint, depends ("A", "A FS+2", "B SS", "C FF-1", several separated by commas), group, progress (%), milestone and wbs. Vietnamese column names (Tên công việc, Bắt đầu, Thời lượng, Phụ thuộc, Nhóm, Tiến độ) and dd/mm/yyyy dates are understood.

The schedule skips weekends (workweek=mon-fri, mon-sat or all) and public holidays: Vietnam by default (official Tết, 30/4–1/5, 2/9 and 24/11 schedules), any country code from the holidays dataset, or holidays=none, plus extra_holidays / extra_workdays. A forward and backward pass (critical path method) gives early / late dates, total float and the critical path.

format=json (default) returns the schedule; svg, png and pdf draw the Gantt chart: task table, bars coloured by group, progress, milestones, dependency arrows, critical path in red, weekends and holidays shaded, a "today" line, day / week / month scale (scale=auto), Vietnamese or English labels (lang). The PDF is A3 landscape by default (page=A4) and paginated for long schedules. Up to 500 tasks; nothing is stored.

Markdown · OpenAPI · Postman · llms.txt

Parameters

NameInTypeRequiredDefault
tasksbody|queryarraynoTasks: {id, name, duration | start + end, start?, depends?, group?, progress?, milestone?, wbs?}. Or send csv or an Excel file.
csvbodystringnoCSV with a header row (English or Vietnamese column names).
filebodyfilenoXLSX file (first visible sheet, or sheet).
project_startbody|querystringnoProject start (YYYY-MM-DD) when no task has a start date.
workweekbody|querystringnomon-frimon-fri, mon-sat or all.
holidaysbody|querystringnoVNVN, another country code (e.g. US, JP) or none.
extra_holidaysbody|queryarraynoExtra non-working dates.
extra_workdaysbody|queryarraynoExtra working dates (e.g. a Saturday make-up day).
formatbody|querystringnojsonjson, svg, png or pdf.
scalebody|querystringnoautoTimeline scale: auto, day, week, month.
langbody|querystringnoviChart labels: vi or en.
titlebody|querystringnoChart title.
todaybody|querystringnoDate of the "today" line (default: today in Vietnam; show_today=0 hides it).
pagebody|querystringnoA3PDF page: A3 or A4 (landscape).

Example

curl -X POST "https://apibox.io.vn/v1/gantt-chart" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tasks":[{"id":"A","name":"Khảo sát","start":"2026-11-20","duration":3},{"id":"B","name":"Thiết kế","duration":5,"depends":"A"},{"id":"C","name":"Xin phép","duration":2,"depends":"A"},{"id":"D","name":"Thi công","duration":10,"depends":"B,C"},{"id":"M","name":"Bàn giao","milestone":true,"depends":"D"}]}'

Response

{
  "project": {
    "start": "2026-11-20",
    "finish": "2026-12-16",
    "working_days": 18,
    "calendar_days": 27,
    "tasks": 5
  },
  "calendar": {
    "workweek": "mon-fri",
    "holidays": "VN",
    "holidays_in_schedule": [
      {
        "date": "2026-11-24",
        "name": "Vietnamese Culture Day"
      }
    ]
  },
  "critical_path": [
    "A",
    "B",
    "D",
    "M"
  ],
  "tasks": [
    {
      "id": "A",
      "name": "Khảo sát",
      "duration": 3,
      "start": "2026-11-20",
      "finish": "2026-11-25",
      "late_start": "2026-11-20",
      "late_finish": "2026-11-25",
      "total_float": 0,
      "critical": true,
      "progress": 0
    },
    {
      "id": "B",
      "name": "Thiết kế",
      "duration": 5,
      "start": "2026-11-26",
      "finish": "2026-12-02",
      "late_start": "2026-11-26",
      "late_finish": "2026-12-02",
      "total_float": 0,
      "critical": true,
      "progress": 0,
      "depends": [
        "AFS"
      ]
    },
    {
      "id": "C",
      "name": "Xin phép",
      "duration": 2,
      "start": "2026-11-26",
      "finish": "2026-11-27",
      "late_start": "2026-12-01",
      "late_finish": "2026-12-02",
      "total_float": 3,
      "critical": false,
      "progress": 0,
      "depends": [
        "AFS"
      ]
    },
    {
      "id": "D",
      "name": "Thi công",
      "duration": 10,
      "start": "2026-12-03",
      "finish": "2026-12-16",
      "late_start": "2026-12-03",
      "late_finish": "2026-12-16",
      "total_float": 0,
      "critical": true,
      "progress": 0,
      "depends": [
        "BFS",
        "CFS"
      ]
    },
    {
      "id": "M",
      "name": "Bàn giao",
      "duration": 0,
      "milestone": true,
      "start": "2026-12-16",
      "finish": "2026-12-16",
      "late_start": "2026-12-16",
      "late_finish": "2026-12-16",
      "total_float": 0,
      "critical": true,
      "progress": 0,
      "depends": [
        "DFS"
      ]
    }
  ],
  "note": "Durations and lags are in working days. Finish dates are the last working day of a task. Milestones (duration 0) sit at the end of their predecessor. Use format=svg / png / pdf for the chart."
}

Use cases

  • Draw the construction schedule for a tender dossier on A3 paper
  • Turn a task list from Google Sheets or Excel into a weekly report chart
  • Compute the critical path and float of a project from a PM tool export
  • Embed an up-to-date Gantt chart image in an e-mail or dashboard

FAQ

Are Vietnamese holidays handled?

Yes. By default the schedule skips Saturdays, Sundays and the official Vietnamese days off (Tết, Hùng Kings, 30/4–1/5, 2/9, 24/11). Use workweek=mon-sat for a six-day site week or holidays=none to ignore holidays.

Which dependency types are supported?

Finish-to-start (default), start-to-start, finish-to-finish and start-to-finish, each with a positive or negative lag in working days, e.g. "3FS+2" or "B SS".

How large can a project be?

Up to 500 tasks and 10 years. PNG output is limited to 16 megapixels; use SVG or PDF (paginated) for large charts.

Related APIs

Start with 1,000 free requests every month. Get free API key →