Skip to Content

Media API

Total endpoints: 14

Source: routes/bg-remover.js

POST/api/bg-removeAuth Required

Uploads transparent PNG to R2. Does NOT update DB or delete originals.

POST/api/bg-remove/compositeAuth Required

Deletes intermediate bg-removed PNGs from R2.

POST/api/bg-remove/confirmAuth Required

Final step: updates DB records and deletes original images from R2.

GET/api/bg-remove/statusAuth Required

GET /bg-remove/status

Source: routes/export.js

GET/api/img/*

URL: /img/:path*.jpg → fetches from R2_PUBLIC_URL without .jpg

POST/api/export-products

Create or update export products

Source: routes/files.js

GET/api/media_filesAuth Required

Get media_files

POST/api/updateFilesAuth Required

Create or update updateFiles

DELETE/api/deletefilesAuth Required

Delete deletefiles

GET/api/getSelectedFilesAuth Required

Get getSelectedFiles

Source: routes/pdfcreation.js

POST/api/createInvoiceAuth Required

Route to generate the invoice PDF

POST/api/createPackagingSlipAuth Required

Create or update createPackagingSlip

POST/api/bulkPackagingSlipCreateAuth Required

Create or update bulkPackagingSlipCreate

POST/api/bulkPrintLabelsAuth Required

Create or update bulkPrintLabels