API Docs

Supported endpoints for this Proofig API clone.

Obtain access token

POST /Curvenote/auth/authenticate

Send client_id and client_secret in the request body to receive an access token. Use this token in the Authorization: Bearer <token> header for submit and status requests. This harness returns a fixed token and does not validate credentials.

Request body

{
  "client_id": "CURVENOTE@proofig.com",
  "client_secret": "your-secret"
}

Success response (200)

{
  "access_token": "this-is-the-proofig-access-token",
  "token_type": "bearer",
  "expires_in": 3600
}

cURL

curl -X POST "http://localhost:5173/Curvenote/auth/authenticate" \
  -H "Content-Type: application/json" \
  -d '{"client_id":"CURVENOTE@proofig.com","client_secret":"your-secret"}'

Create a submission

POST /api/curvenote/api/submit

multipart/form-data or application/json

You may send an optional Authorization: Bearer <token> header (use the token from /Curvenote/auth/authenticate). Requests are never rejected for a missing or invalid token; the Admin → API Logs view shows whether the Bearer token was present for each submit and status request.

Option A: JSON request (no upload required)

Send application/json with optional file_url. If no file is provided, the submission is still created.

Option B: Multipart request (upload optional)

  • application/json: JSON string metadata (see example below)
  • PDF: PDF file upload (optional)

Request metadata example (application/json)

{
  "submit_req_id": "optional-editorial-id",
  "title": "Manuscript Title",
  "journal": "Journal Name",
  "authors": "Alice Example; Bob Example",
  "identifier": "optional-doi-or-id",
  "notes": "optional notes",
  "filename": "manuscript.pdf",
  "notify_url": "",
  "file_url": "https://example.com/manuscript.pdf"
}

Success response (200)

{
  "status": "Success",
  "report_id": "0b9f8e7b-9d6b-4d9a-9caa-6d9f1b3d6d4a",
  "error_message": ""
}

cURL

curl -X POST "http://localhost:5173/api/curvenote/api/submit" \
  -F 'application/json={"submit_req_id":"optional-editorial-id","title":"Manuscript Title","journal":"Journal Name","authors":"Alice Example; Bob Example","identifier":"optional-doi-or-id","notes":"optional notes","filename":"manuscript.pdf","notify_url":"","file_url":"https://example.com/manuscript.pdf"};type=application/json' \
  -F "PDF=@/path/to/manuscript.pdf;type=application/pdf"

Check submission status

POST /api/curvenote/api/status

application/json

Optional Authorization: Bearer <token> is recorded in Admin → API Logs (same as submit).

Request body

{
  "report_id": "0b9f8e7b-9d6b-4d9a-9caa-6d9f1b3d6d4a"
}

Success response (200)

{
  "submit_req_id": "optional-editorial-id",
  "report_id": "0b9f8e7b-9d6b-4d9a-9caa-6d9f1b3d6d4a",
  "state": "Processing",
  "subimages_total": 10,
  "matches_review": 0,
  "matches_report": 0,
  "inspects_report": 0,
  "report_url": "http://localhost:5173/admin/submissions/0b9f8e7b-9d6b-4d9a-9caa-6d9f1b3d6d4a",
  "number": 0,
  "message": "Service in process..."
}

cURL

curl -X POST "http://localhost:5173/api/curvenote/api/status" \
  -H "Content-Type: application/json" \
  -d '{"report_id":"0b9f8e7b-9d6b-4d9a-9caa-6d9f1b3d6d4a"}'

Error format

Errors generally return:

{
  "status": "Error",
  "error_message": "Details..."
}