Admin API¶
The admin module talks to the backend over a small REST API under
/api/_action/fujin-shuttle. All routes are in the api route scope and require a Shopware
admin bearer token (the same auth as any /api call). These are the endpoints the Vue UI
uses; you can also call them from scripts and integrations.
Get a token
Profiles¶
| Method | Path | Route name | Purpose |
|---|---|---|---|
GET |
/profile |
api.fujin_shuttle.profile.list |
List all profiles. |
GET |
/profile/{id} |
api.fujin_shuttle.profile.get |
Get one profile + its detected columns. |
POST |
/profile |
api.fujin_shuttle.profile.save |
Create or update a profile (JSON body; include id to update). |
DELETE |
/profile/{id} |
api.fujin_shuttle.profile.delete |
Delete a profile. |
A profile body carries name, the data type, the transfer mode
(import/export) and an options object (dry-run, batch size, concurrency, reindex mode,
parent category). Save returns the profile id.
CSV files¶
| Method | Path | Route name | Purpose |
|---|---|---|---|
POST |
/profile/{id}/upload |
api.fujin_shuttle.profile.upload |
Upload a CSV (multipart). Returns the stored path + detected columns. |
POST |
/profile/{id}/upload-chunk |
api.fujin_shuttle.profile.upload_chunk |
Chunked upload for large files (sidesteps web-server/PHP body limits). |
GET |
/server-files |
api.fujin_shuttle.server_files |
List CSV files under the Fujin base directory (var/fujin-shuttle/**). |
POST |
/profile/{id}/use-server-file |
api.fujin_shuttle.profile.use_server_file |
Adopt a server-side file by path. Returns detected columns. |
Attaching a file detects its header row and stores the column list against the profile.
Running & monitoring¶
| Method | Path | Route name | Purpose |
|---|---|---|---|
POST |
/profile/{id}/run |
api.fujin_shuttle.profile.run |
Start a run. Returns a jobId and whether it ran sync or was queued (per syncRowThreshold). Accepts a dryRun flag. |
GET |
/job/{id}/status |
api.fujin_shuttle.job.status |
Poll job status: status, phase, total/processed/progress, per-status stats, timestamps, and the per-row log. |
POST |
/job/{id}/stop |
api.fujin_shuttle.job.stop |
Request cooperative cancellation (flips the job to stopping). |
GET |
/profile/{id}/export |
api.fujin_shuttle.profile.export |
Run an export and stream the resulting CSV as a download. |
The status payload mirrors the fujin_job / fujin_job_log rows — see
Database schema → job lifecycle.
Templates & helpers¶
| Method | Path | Route name | Purpose |
|---|---|---|---|
GET |
/template?dataType=<type> |
api.fujin_shuttle.template |
Download the header-only template CSV for a data type. |
GET |
/example?dataType=<type> |
api.fujin_shuttle.example |
Download the header + sample-rows example CSV. |
GET |
/storefront-root |
api.fujin_shuttle.storefront_root |
The default parent category ID (used to pre-fill the profile form). |
Example¶
TOKEN=<bearer>
BASE=https://<shop>/api/_action/fujin-shuttle
# List profiles
curl -s -H "Authorization: Bearer $TOKEN" "$BASE/profile"
# Download a product template
curl -s -H "Authorization: Bearer $TOKEN" "$BASE/template?dataType=product" -o product-template.csv
# Start a run, then poll
JOB=$(curl -s -H "Authorization: Bearer $TOKEN" -X POST "$BASE/profile/<id>/run" \
-H 'Content-Type: application/json' -d '{"dryRun":false}' | jq -r .jobId)
curl -s -H "Authorization: Bearer $TOKEN" "$BASE/job/$JOB/status"