Reorder PDF pages API
Put pages in a new order: [3, 1, 2] makes page 3 first. Pages left out are dropped.
POST /v1/pdf/reorder-pages
Price: 1 credit per 100 pages (started). Takes: pdf. Makes: pdf.
The same as a one-step job with the action reorder_pages, which can be chained with other steps.
Request
curl -X POST https://api.fynepdf.com/v1/pdf/reorder-pages \
-H "Authorization: Bearer $FYNEPDF_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","order":[3,1,2]}'Body
| Parameter | Type | Required | What it does |
|---|---|---|---|
file_id | string | The input file. | |
file_ids | array of string | Input files, for actions that take several (merge, image_to_pdf). | |
wait | integer | Seconds to wait for the result (default 30). | |
webhook_url | string | ||
metadata | object | Your own keys and values, returned on the job and in webhooks. | |
order | array of integer | yes |
Response
A job: 200 when it finished within wait (30 seconds by default), 202 if it is still running; then poll it or use a webhook. The receipt says what each step did and cost, and outputs holds the result with a download link (good for an hour; the file is kept 24 hours).
{
"object": "job",
"id": "job_01jc9a2b3c4d5e6f7g8h9j",
"status": "succeeded",
"mode": "live",
"inputs": [
"file_01jc8x4m2k9q7r3t5vwy6z"
],
"steps": [
{
"action": "reorder_pages",
"params": {
"order": [
3,
1,
2
]
}
}
],
"receipt": {
"steps": [
{
"step": 1,
"action": "reorder_pages",
"status": "succeeded",
"credits": 1,
"pages_before": 14,
"pages_after": 14,
"bytes_before": 8700000,
"bytes_after": 4600000,
"duration_ms": 4200
}
],
"credits": 1,
"credits_quoted": 1,
"duration_ms": 4300
},
"outputs": [
{
"object": "file",
"id": "file_01jc9b7c8d9e0f1g2h3j4k",
"filename": "result.pdf",
"kind": "pdf",
"bytes": 4600000,
"pages": 14,
"download_url": "https://files.fynepdf.com/…",
"expires_at": "2026-11-02T10:30:00.000Z"
}
],
"error": null
}
Errors
Errors are problem details (RFC 9457) with a code you can branch on and a request_id for support.