{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"baaddadb-397c-41f2-86dd-511eaf0e30e5","name":"DCA Developer Documentation","description":"# Introduction\nDCA provides users with an API to convert files from your computer, files that you can access using Web protocols (SFTP, FTP, HTTP) or using your remote storage accounts (Amazon S3 and Azure). Our APIs are fast, reliable, scalable and easy to use!\n\nThe following documentation shows how to use API and get starter quick and without any issues. Shall you have any questions about anything that is not covered by this topic, please check our FAQ page or contact us at info@docconversionapi.com.\n\nTo start using our API you will need to [sign up for an account](https://app.docconversionapi.com/#/createaccount) first.\n\n# Getting started\nTo convert a file to any available format you just need to perform following actions:\n1. Get an API Key + Secret.\n2. Trigger a conversion process.\n3. Download the result to your local or remote folder.\n\n## Getting an API Key/Secret\nFor every request that you make to DCA API you must have a Key and Secret to be able to authenticate. If you have already [signed up for an account](https://app.docconversionapi.com/#/createaccount), you can find and copy your Key/Secret values on [API Applications page](https://app.docconversionapi.com/#/applications).\n\nLet's look at an example of a simple call to our API to get the status.\n\n## Node.js\n\n\t\tvar request = require('request');\n\t    \n\t\trequest.post({\n\t\t   url:'https://api.docconversionapi.com/status'\n\t\t\t}, function (err, response) {\n\t\t    if (err) {\n\t\t    \tconsole.log(err);\n\t\t    } else {\n\t\t    \tconsole.log(response.body);\n\t\t    }\n\t\t});\n\n## JSON Response example\n\n\t{\n\t    \"statusCode\": \"Down\",\n\t    \"authStatus\": \"Invalid\",\n\t    \"services\": [\n\t        {\n\t            \"name\": \"DocBot\",\n\t            \"statusCode\": \"OK\",\n\t            \"errorMessage\": null\n\t        }\n\t    ]\n\t}\n\n# Error Handling and Prevention\n\n# Error Codes\nError message will always look like this so you can design your app to handle different types of error in an appropriate way.\n\n~~~\n{\n   \"errors\":[\n      {\n         \"code\":\"an_error_code\",\n         \"message\":\"Some error message\",\n         \"logId\":1234\n      }\n   ]\n}\n~~~\n\nExample error codes:\n\n|HTTP Status Code |Error Code |Message \n|--  |--   |--\n|400 |2001 | Validation error\n|500 |2002 | Document opening error\n|500 |2003 | Document handling error\n|500 |2004 | Document saving error\n|500 |9999 | Validation error\n\nHere you can see possible error messages and their reasons:\n\n|Error Code |Message | Reason\n|--  |-- |--\n||inputFile is missing in the request body |Please include 'inputFile' into request\n||file is provided but it's empty (file size is 0 bytes)|inputFile' is empty\n||input file extension is not in allowed extensions list (see above)|inputFile' extension is not supported\n||outputFormat value is not in allowed extensions list (see above)|outputFormat' isn't supported\n||optionsJson value is not a valid JSON string|Invalid 'optionsJson'\n||'pages' parameter in optionsJson has invalid value|Invalid value provided for 'pages' parameter\n||'width' and/or 'height' values are above 500%|Requested image dimensions are too large, please reduce the dimensions and try again.\n||unit specified for 'height' parameter is neither 'px' nor '%'|Unsupported units used for height.\n||value of 'height' parameter is not a number/negative number/not number at all|Invalid value provided for 'height' parameter\n||unit specified for 'width' parameter is neither 'px' nor '%'|Unsupported units used for width.`\n||value of 'width' parameter is not a number/negative number/not number at all|Invalid value provided for 'width' parameter\n||value of 'pdfType' parameter is not in allowed types list|Invalid value provided for 'pdfType' parameter`\n||value of 'orientation' parameter is neither 'portrait' nor 'landscape'|Invalid value provided for 'orientation' parameter","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"227433","team":62204,"collectionId":"baaddadb-397c-41f2-86dd-511eaf0e30e5","publishedId":"RVtyproj","public":true,"publicUrl":"https://docs.docconversionapi.com","privateUrl":"https://go.postman.co/documentation/227433-baaddadb-397c-41f2-86dd-511eaf0e30e5","customColor":{"top-bar":"333333","right-sidebar":"EEEEEE","highlight":"FFA500"},"documentationLayout":"classic-double-column","version":"8.11.4","publishDate":"2018-05-09T11:33:51.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"DCA Production - Public Docs","id":"daf931d6-7139-4901-896d-cf7cc8a165e9","owner":"227433","values":[{"key":"Info","value":"This uses the live server and the Pingdom App ID.","enabled":true,"type":"text"},{"key":"serverDomain","value":"https://api.docconversionapi.com","enabled":true,"type":"text"},{"key":"X-ApplicationID","value":"<Your_Application_ID>","enabled":true,"type":"text"},{"key":"X-SecretKey","value":"<Your_Application_SecretKey>","enabled":true,"type":"text"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/e92816062422bba215f0059ecf8e17006d83b726f5afb72980b97c5a278f9dcd","favicon":"https://docconversionapi.com/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"DCA Production - Public Docs","value":"227433-daf931d6-7139-4901-896d-cf7cc8a165e9"}],"canonicalUrl":"https://docs.docconversionapi.com/view/metadata/RVtyproj"}