{"info":{"_postman_id":"e3392981-7501-4901-a883-09f3e72d4df4","name":"Sypht","description":"Welcome to the Sypht API documentation.\n \nSypht is an API for document data extraction.  This documentation lays out how to extract a set of fields from invoices. To learn about extraction of other fields or document types please [contact us](https://www.sypht.com/contactus).\n\nTo get started, you will need to [contact us](https://www.sypht.com/contactus) to get a set of access credentials. From there, we can get you started on a 30-day free trial. Your credentials will enable you to generate a `bearerToken`, which is required to access the Sypht API.\n \nField extraction can be completed with two simple requests: \n* upload document \n* retrieve results\n \nEach document upload request should include a `fieldSet` to help us identify the group of fields you wish to extract. If no `fieldSet` is specified, Sypht will return the default `fieldSet` associated to your account.  \n\n|fieldSet|`invoiceBpayPayment`|`invoiceElectricity`|`invoiceAccountsPayable`|\n|---|---|---|---|\n|Fields extracted:|<ul><li>Amount due</li><li>Due date</li><li>BPAY biller code</li><li>BPAY customer ref number</li><li>Invoice no.</li></ul>|<ul><li>NMI</li><li>Number of days</li><li>Avg. daily cost($)</li><li>Avg. daily usage(kWh)</li><li>Supply address</li></ul>|<ul><li>Document date</li><li>Supplier name</li><li>Supplier ABN</li><li>Invoice no.</li><li>PO number</li><li>Account number</li><li>Net amount</li><li>GST amount</li><li>Gross amount</li></ul>|\n\nA `fileId` is returned which can be used to retrieve your results for that particular document. Results take about 20 seconds to process and can then be accessed through the Results API.\n\n# How to Sypht\n 1. [Getting your bearer token](#3a1ad517-5a34-4991-a13a-5f033e9a1bef)\n 2. [Upload a document](#94b68b74-6da0-43a5-8d09-23dd71a92359)\n 3. [Retrieve results](#5f69917f-a68b-49fc-a765-fb5fc572b7a6)\n \n# Response Codes\n\n**Success**\n\nIn the responses, Sypht returns these HTTP status codes for successful requests:\n\n|Status|Description|\n|----|-----|\n|`200 OK`| The request succeeded |\n\n**Error**\n\nIn the responses for failed requests, Sypht returns HTTP 4XX or 5XX status codes:\n\n|Status|Message|Cause|\n|----|-----|-----|\n|`400 BAD REQUEST`| Validation errors | A descriptive message will be returned to explain the specific error encountered.|\n|`401 Unauthorized`| Invalid credentials| Credentials entered are incorrect.|","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"Authentication","item":[{"name":"/oauth/token","event":[{"listen":"test","script":{"id":"cc133791-43d7-4ca9-9b1d-daf1dd046a82","exec":["pm.test(\"authentication successful\", function () { ","    pm.response.to.not.be.error; ","    var responseJson = pm.response.json();","    postman.setEnvironmentVariable(\"bearerToken\", responseJson.access_token);","});"],"type":"text/javascript"}}],"id":"fb57673f-2362-47e3-8a2f-fe947da6446e","request":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"client_id\":\"{{client_id}}\",\n  \"client_secret\":\"{{client_secret}}\",\n  \"audience\":\"https://api.sypht.com\",\n  \"grant_type\":\"client_credentials\"  \n}"},"url":"https://login.sypht.com/oauth/token","description":"**Payload Body**\n\n|Field|Value|\n|---|---|\n|`client_id`|The `client_id` obtained on sign-up with sypht.|\n|`client_secret`|The `client_secret` obtained on sign-up with sypht.|\n\n**Response**\n\n|Field|Value|\n|---|---|\n|`access_token`|The value to use as a bearerToken in Authorization header for making subsequent calls. ex `Authorization=Bearer {{bearerToken}}`|"},"response":[{"id":"3997ea98-5aaa-4c11-8b29-997e7a554686","name":"/oauth/token","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json","disabled":false},{"key":"Content-Type","value":"application/json","disabled":false}],"body":{"mode":"raw","raw":"{\n\t\"client_id\":\"{{client_id}}\",\n\t\"client_secret\":\"{{client_secret}}\",\n\t\"audience\":\"https://api.sypht.com\",\n\t\"grant_type\":\"client_credentials\"\t\n}"},"url":"https://sypht.au.auth0.com/oauth/token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0","name":"Cache-Control","description":"Tells all caching mechanisms from server to client whether they may cache this object. It is measured in seconds"},{"key":"Connection","value":"keep-alive","name":"Connection","description":"Options that are desired for the connection"},{"key":"Content-Length","value":"1306","name":"Content-Length","description":"The length of the response body in octets (8-bit bytes)"},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":"The mime type of this content"},{"key":"Date","value":"Tue, 15 May 2018 04:19:48 GMT","name":"Date","description":"The date and time that the message was sent"},{"key":"Pragma","value":"no-cache","name":"Pragma","description":"Implementation-specific headers that may have various effects anywhere along the request-response chain."},{"key":"Strict-Transport-Security","value":"max-age=15724800","name":"Strict-Transport-Security","description":"A HSTS Policy informing the HTTP client how long to cache the HTTPS only policy and whether this applies to subdomains."},{"key":"X-Auth0-RequestId","value":"647c011c915e5d7bd539","name":"X-Auth0-RequestId","description":"Custom header"},{"key":"X-RateLimit-Limit","value":"30","name":"X-RateLimit-Limit","description":"Custom header"},{"key":"X-RateLimit-Remaining","value":"29","name":"X-RateLimit-Remaining","description":"Custom header"},{"key":"X-RateLimit-Reset","value":"1526357989","name":"X-RateLimit-Reset","description":"Custom header"},{"key":"X-Robots-Tag","value":"noindex, nofollow, nosnippet, noarchive","name":"X-Robots-Tag","description":"Custom header"}],"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik9VUkRNelV3UVVGQ01qRXhNakF5T1Rrek5VSTBORU5DUXpORE5EZzBOak5ETWtZMU5FSTFOdyJ9.eyJpc3MiOiJodHRwczovL3N5cGhlbi5hdS5hdXRoMC5jb20vIiwic3ViIjoiOXQzeHdUSGhDVzY4MTk5MTBzRjR2RUV2SWN2QkdYQkZAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vYXBpLnN5cGh0LmNvbSIsImlhdCI6MTUyNjg2NzAyNSwiZXhwIjoxNTI2OTUzNDI1LCJhenAiOiI5dDN4d1RIaENXNjgxOTkxMHNGNHZFRXZJY3ZCR1hCRiIsInNjb3BlIjoicmVzdWx0OmFsbCBmaWxldXBsb2FkOmFsbCIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.samplesamplesamplesamplesample-ZWPj3qNo0NYFUFZ3UvcWp2EZHdjP6xpGa8hA04k1M4Abad0IPkPBPP9I3WzcIpHGALgTslDOOL_sl7wWgscU9gkaq5mePh25DqrAs6cE1YXqaixyM3y3FS8EO8jRaD8m_AuKkYJxttqZNmKf6c7PgyT_w5_thObzxa4yvv-ULMDOj4WYlc6qurdKYZkg3KC_EaYOwTrdOirOy40FtHm6hLNY1_yikImtBJ3MGbyR_pz54GA\",\n    \"scope\": \"result:all fileupload:all\",\n    \"expires_in\": 86400,\n    \"token_type\": \"Bearer\"\n}"}],"_postman_id":"fb57673f-2362-47e3-8a2f-fe947da6446e"}],"id":"3a1ad517-5a34-4991-a13a-5f033e9a1bef","description":"We take security seriously, so industry standard security and encryption is used to ensure your documents are in safe hands. Users are supplied with a `client_id` and `client_secret` upon signing up with Sypht. Use these to access your bearer token, which must be included in the header of each request.\n\n","event":[{"listen":"prerequest","script":{"id":"c07ceac7-0369-42ad-bce1-b149452615c1","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"9a5e6ff2-c1fe-44e2-a57f-71df5bb3e934","type":"text/javascript","exec":[""]}}],"_postman_id":"3a1ad517-5a34-4991-a13a-5f033e9a1bef"},{"name":"Upload Document","item":[{"name":"/fileupload","event":[{"listen":"test","script":{"type":"text/javascript","exec":["// Did file upload succeed.","pm.test(\"Did file upload successfully?\", function(){","    pm.response.to.have.status(200);","});"]}}],"id":"3263056a-d96f-47c5-bd98-7507458df0be","request":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"multipart/form-data"},{"key":"Authorization","value":"Bearer {{bearerToken}}"}],"body":{"mode":"formdata","formdata":[{"key":"fileToUpload","type":"file","value":null,"description":"Document for extraction."},{"key":"fieldSet","value":"","description":"This is the group of fields that will be extracted.","type":"text"}]},"url":"https://api.sypht.com/fileupload","description":"Please supply a valid `bearerToken` and `fieldSet`.\n\n`fieldSet` is optional, if no `fieldSet` is specified Sypht will return the default `fieldSet` associated to your account.   \n\n**Response**\n\n|Field|Value|\n|---|---|\n|`fileId`|The unique identifier associated to this file and request.|"},"response":[{"id":"8f9c92b3-bd7a-4b76-81b6-5e2e79279407","name":"file-upload","originalRequest":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"multipart/form-data"},{"key":"Authorization","value":"Bearer {{bearerToken}}","description":"Input bearedToken value."}],"body":{"mode":"formdata","formdata":[{"key":"fileToUpload","type":"file","description":"The file to upload.","src":null},{"key":"tags","value":"prtag","type":"text","description":"User should not change.","disabled":true},{"key":"workflowId","value":"e6985ffb-9a61-4249-a2e2-4a9851963c43","type":"text","description":"User should not change.","disabled":true},{"key":"workflowOptions","value":"{ \"reward\": 0.03, \"numWorkers\": 2, \"sendToProd\": \"false\"}","type":"text","description":"User should not change.","disabled":true},{"key":"fieldSet","value":"invoiceBpayPayment","description":"Type of document ex. electricity bill or invoice","type":"text"}]},"url":"https://api.sypht.com/fileupload"},"status":"OK","code":200,"_postman_previewlanguage":"","header":[],"cookie":[],"responseTime":null,"body":"{\n    \"fileId\": \"30d3e543-47c8-42e6-a6f6-40c50d199395\",\n    \"uploadedAt\": \"2018-05-15T04:23:14.027Z\",\n    \"status\": \"RECEIVED\"\n}"}],"_postman_id":"3263056a-d96f-47c5-bd98-7507458df0be"}],"id":"94b68b74-6da0-43a5-8d09-23dd71a92359","description":"## Upload Document\nUse this endpoint to upload a document in either PDF, PNG or JPG format to the Sypht platform for extraction. Maximum file size supported is 20Mb and maximum pages per document is 50.","event":[{"listen":"prerequest","script":{"id":"88098a07-df99-4c03-94ad-ea4e6b64c409","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"60b44b70-a812-4a7e-862f-b74a77c07d09","type":"text/javascript","exec":[""]}}],"_postman_id":"94b68b74-6da0-43a5-8d09-23dd71a92359"},{"name":"Results","item":[{"name":"/result/final/:fileId","event":[{"listen":"test","script":{"type":"text/javascript","exec":["// Test if service is up","pm.test(\"Is endpoint working?\", function(){","    pm.response.to.have.status(200);","});","","pm.test(\"result contains status\", function(){","   var jsonData = pm.response.json();","   pm.expect(jsonData).to.have.property('status');","});"]}}],"id":"085e998b-9e2e-412a-bcdd-6d1bc6712213","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer {{bearerToken}}"}],"body":{"mode":"raw","raw":""},"url":"https://api.sypht.com/result/final/{{fileId}}","description":"This endpoint allows you to query the results gathered from Sypht's field extraction.\n\n**Path Parameters**\n\n|Field|Value|\n|---|---|\n|`fileId`|The unique identifier associated to the document received at the time of upload.|\n\n**Response**\n\n|Field|Value|\n|---|---|\n|`fileId`|The unique identifier associated to the document received at the time of upload.|\n|`status`|Result retrieval status. (`IN PROGRESS` or `FINALISED`)|\n|`fields`|A list of all the fields extracted from the document along with the `name`, `value` and `confidence` (range 0-1, where 1 implies 100%).| \nRefer to [appendix](#715577fe-40ff-4e6f-a470-9577d746ae80) for detailed description of all the fields.|"},"response":[{"id":"aff451fe-4519-4e98-83d2-ef416ec26837","name":"final","originalRequest":{"method":"GET","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer {{bearerToken}}"}],"body":{"mode":"raw","raw":""},"url":"https://api.sypht.com/result/final/a44b272a-aabb-4c7d-a473-769e09344044"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Access-Control-Allow-Origin","value":"*","name":"Access-Control-Allow-Origin","description":"Specifies a URI that may access the resource. For requests without credentials, the server may specify '*' as a wildcard, thereby allowing any origin to access the resource."},{"key":"Connection","value":"keep-alive","name":"Connection","description":"Options that are desired for the connection"},{"key":"Content-Length","value":"359","name":"Content-Length","description":"The length of the response body in octets (8-bit bytes)"},{"key":"Content-Type","value":"application/json","name":"Content-Type","description":"The mime type of this content"},{"key":"Date","value":"Tue, 15 May 2018 06:00:39 GMT","name":"Date","description":"The date and time that the message was sent"},{"key":"Server","value":"nginx/1.12.1","name":"Server","description":"A name for the server"}],"cookie":[],"responseTime":null,"body":"{\n    \"fileId\": \"a44b272a-aabb-4c7d-a473-769e09344044\",\n    \"status\": \"FINALISED\",\n    \"results\": {\n        \"timestamp\": \"2018-05-10T01:42:12.078Z\",\n        \"fields\": [\n            {\n                \"name\": \"bpayBillerCode\",\n                \"value\": \"7773\",\n                \"confidence\": 1\n            },\n            {\n                \"name\": \"dueDate\",\n                \"value\": \"2018-01-17\",\n                \"confidence\": 1\n            },\n            {\n                \"name\": \"bpayCRN\",\n                \"value\": \"2376513400\",\n                \"confidence\": 1\n            },\n            {\n                \"name\": \"amountDueAfterDiscount\",\n                \"value\": \"27.50\",\n                \"confidence\": 1\n            }\n        ]\n    }\n}"}],"_postman_id":"085e998b-9e2e-412a-bcdd-6d1bc6712213"},{"name":"/result/image/:fileId","event":[{"listen":"test","script":{"id":"570b0ffb-f8f5-42fe-85db-9f02e89df7a1","type":"text/javascript","exec":["// Test if service is up","pm.test(\"Is endpoint working?\", function(){","    pm.response.to.have.status(200);","});",""]}}],"id":"bca13b19-93f0-406e-9c05-39f7f96a02a5","request":{"method":"GET","header":[{"key":"Accept","value":"application/json","disabled":true},{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer {{bearerToken}}"}],"body":{"mode":"raw","raw":""},"url":"https://api.sypht.com/result/image/{{fileId}}","description":"This endpoint allows you to retrieve an image copy of the uploaded document\n\n**Path Parameters**\n\n|Field|Value|\n|---|---|\n|`fileId`|The unique identifier associated to the document received at the time of upload.|"},"response":[],"_postman_id":"bca13b19-93f0-406e-9c05-39f7f96a02a5"},{"name":"/result/image/:fileId?page","event":[{"listen":"test","script":{"id":"570b0ffb-f8f5-42fe-85db-9f02e89df7a1","exec":["// Test if service is up","pm.test(\"Is endpoint working?\", function(){","    pm.response.to.have.status(200);","});",""],"type":"text/javascript"}}],"id":"371142fe-e179-401b-a50a-d8740bb401a2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","disabled":true},{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer {{bearerToken}}"}],"url":{"raw":"https://api.sypht.com/result/image/{{fileId}}?page=1","protocol":"https","host":["api","sypht","com"],"path":["result","image","{{fileId}}"],"query":[{"key":"page","value":"1"}]},"description":"This endpoint allows you to retrieve an image copy of the uploaded document\n\n**Path Parameters**\n\n|Field|Value|\n|---|---|\n|`fileId`|The unique identifier associated to the document received at the time of upload.|"},"response":[],"_postman_id":"371142fe-e179-401b-a50a-d8740bb401a2"}],"id":"5f69917f-a68b-49fc-a765-fb5fc572b7a6","description":"## Retrieve Extraction results\nUser can query this endpoint to gather the results produced by Sypht.","event":[{"listen":"prerequest","script":{"id":"f7af438e-1784-413d-9e6e-c0e26be37173","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"09c5dcd5-4bb3-43fe-9c4c-7037b3a678c1","type":"text/javascript","exec":[""]}}],"_postman_id":"5f69917f-a68b-49fc-a765-fb5fc572b7a6"},{"name":"Appendix","item":[],"id":"715577fe-40ff-4e6f-a470-9577d746ae80","description":"# Options\n\n`fieldSet: invoiceBpayPayment`\n\n**Fields Received**\n\n|Field|API fieldName|format|Description|\n|---|---|---|---|\n|Amount Due (Including Discount)|amountDueAfterDiscount|Decimal number. Should have 2 decimal places.|The total amount owed after any deductions or adjustments, such as discounts.|\n|Due Date|dueDate|YYYY-MM-DD, eg: 2018/01/17|The date the invoice amount is due to be paid.|\n|BPAY Biller Code|bpayBillerCode|Numeric values (3-10 digits). No spaces.|The BPAY Biller Code for the supplier.|\n|BPAY Customer Reference Number|bpayCRN|Numeric values (3-20 digits). No spaces.|The BPAY Customer Reference Number identifies the customer making the payment.|\n|Invoice no.|invoiceNo|No spaces.|Unique identifier generated by suppliers to identify the invoice.|","event":[{"listen":"prerequest","script":{"id":"325a522f-7904-40ff-8e93-9dfe551baad4","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5dffc79c-41d1-42ac-9599-cd112a447353","type":"text/javascript","exec":[""]}}],"_postman_id":"715577fe-40ff-4e6f-a470-9577d746ae80"}],"auth":{"type":"bearer","bearer":{}},"event":[{"listen":"prerequest","script":{"id":"fc186fc8-76b0-4d0a-9abd-2fb0c3d9c656","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"a3144d5f-a58f-4334-b923-3ce315045178","type":"text/javascript","exec":[""]}}]}