Conversions


Get All Conversions   |    Get One Conversion   |    Create Conversion

GET /api/conversions


Retrieves conversions


Request Params

  • api_tokenstring
  • perintegernumber of records to return (minimum: 1, maximum: 50)
  • pageintegerpagination
Successful Response Example (status: 200)

{
  "total_conversions": 1,
  "current_page": 1,
  "per_page": 20,
  "total_pages": 1,
  "conversions": [
    {
      "id": "2e616288-0ec8-42e3-81c4-374d9eece785",
      "type": "WordToPdf",
      "status": "completed",
      "source_files": [
        "http://iiswc.org/iiswc2013/sample.doc"
      ],
      "processing_time_in_seconds": 10
    }
  ]
}
Failed Response Example (status: 401)

{
  "errors": Array[1][
    "unauthorized"
  ]
}


Request Params




Server Response (status: {{server_status}})
{{timeNow()}}
{{server_response}}


GET /api/conversions/:id


Retrieves a single conversion


Request Params

  • api_tokenstring
Successful Response Example (status: 200)

{
  "id": "2e616288-0ec8-42e3-81c4-374d9eece785",
  "type": "WordToPdf",
  "status": "completed",
  "source_files": [
    "http://iiswc.org/iiswc2013/sample.doc"
  ],
  "temporary_download_urls": [
    "https://fileturn-dev.s3.amazonaws.com/b774da7d-3d92-48a3-a64f-b469c1f9abd9/sample.pdf?AWSAccessKeyId=AKIAIG4W7R33BAWKUJMQ&Expires=1531242073&Signature=grC39Euxe8BLvucJPINs0qq2wHk%3D"
  ],
  "processing_time_in_seconds": 10,
  "error_type": null,
  "error_details": null,
  "notification_responses": [
    {
      "id": "7934728e-81e2-41f0-913a-9aba226a03c5",
      "status": "failed",
      "type": "webhook",
      "status_code": 0,
      "url": "https://webhook.site/fe617ff1-54e3-4ad0-bc3b-9fc3b77eab3d"
    }
  ],
  "cost": 1,
  "storage": {
    "id": "9c116184-7794-42ff-8ff6-9309466ac416",
    "type": "Amazon S3"
  }
}
Failed Response Example (status: 401)

{
  "errors": Array[1][
    "unauthorized"
  ]
}
Failed Response Example (status: 404)

{
  "errors": [
    "not found"
  ]
}


Request Params




Server Response (status: {{server_status}})
{{timeNow()}}
{{server_response}}


POST /api/conversions


Starts the conversion process for documents. This process happens asyncronously so the returned response will have a status of created.

About batch urls:
  • If one documents fails conversion in batch processing, the conversion object will return failed. All documents must successful process for the conversion object to return successful.
  • The cost of a conversion for batch processing is based on the number of urls to convert. If there are 4 urls in the batch conversion, it will be counted as 4 conversions from monthly quota.

Request Params

  • api_tokenstring
  • urlstring - url of the document to convert
  • urlsarray - batch convert with an array of urls
  • typestring - see available formats
  • storage_iduuid - optional. custom storage can be added here
Successful Response Example (status: 200)

{
  "id": "6fba622b-ce76-4fb4-8c58-6acd1cc8428b",
  "type": "WordToPdf",
  "status": "created",
  "source_files": [
    "http://iiswc.org/iiswc2009/sample.doc"
  ],
  "temporary_download_urls": [],
  "processing_time_in_seconds": null,
  "error_type": null,
  "error_details": null,
  "notification_responses": [],
  "cost": 1,
  "storage": {
    "id": "9c116184-7794-42ff-8ff6-9309466ac416",
    "type": "Amazon S3"
  }
}
Bad Request (status: 400)

{
  "errors": [
    "Type can't be blank",
    "Source files can't be blank"
  ]
}
Failed Response Example (status: 401)

{
  "errors": Array[1][
    "unauthorized"
  ]
}


Request Params




Server Response (status: {{server_status}})
{{timeNow()}}
{{server_response}}


Request Params




Server Response (status: {{server_status}})
{{timeNow()}}
{{server_response}}