NAV Navbar
shell python javascript
Documentation header

Introduction

Welcome to Inscribe! Use the Inscribe API to evaluate your customers' documents so you can approve your customers faster and reduce fraud. Inscribe automatically extracts key information from your documents and looks for evidence of fraud in an instant.

Here you can find all the documentation and sample code you need to get started. If you have any questions about the API, pricing or new features please contact us or join our Slack support group.

Version: 1.0.0

Quick Start Guide

This quickstart guide allows you to evaluate your first customer document set within minutes. Follow the steps below to get started.

# Install the Inscribe python wrapper using the command:
pip3 install inscribe
// Install the Inscribe javascript wrapper using the command:
npm install --save @inscribe/inscribe

Sign Up and generate API Key

Sign up to Inscribe for free on our website to create your account and visit your API page to generate your API key.


const InscribeAPI = require('@inscribe/inscribe')

let api = new InscribeAPI("API_KEY")

api.createCustomer(customerName).then((customer) => {
  const customerId = customer['data']['id']

  const documentObject = fs.createReadStream(`./path/to/document.pdf`)
  const fileName = "document.pdf"
  api.uploadDocument(customerId, documentObject, fileName).then((createdDocument) => {
    const documentId = createdDocument['result_urls'][0]['document_id']

    api.checkDocument(customerId, documentId).then((response) => {
      if (!!response.success) { console.log("success", response) }
    })
  })
})

import inscribe

# API Authentication
api = inscribe.Client(api_key="YOUR_API_KEY")

# Create customer folder
customer = api.create_customer(customer_name="new")
customer_id = customer['data']['id']

# Upload document
doc_obj = open("DOCUMENT_FILE_PATH", "rb+")
document = api.upload_document(customer_id=customer_id, document=doc_obj)
document_id = document['result_urls'][0]['document_id']

# Check document
result = api.check_document(customer_id=customer_id, document_id=document_id)
curl "http://www.inscribe.ai/api/v1/customers" \
  -H "Authorization: YOUR_API_KEY" \ 
  -d '{"customer_name": "first_customer"}'

Create Your First Customer

To evaluate a customer document set, the first step is to create a customer folder. Customer folders are used to store documents. You should create a customer folder for each new customer you want to evaluate.

curl "https://app.inscribe.ai/api/v1/customers/{customer_id}/documents" \
  -H "Authorization: YOUR_API_KEY" \
  -F {document_filename}{.pdf, .png, .jpg}=@/{document_file_path}

Upload Your First Document

The second step is to upload documents to your customer folder. When the documents are uploaded, they are automatically analyzed by our fraud detection systems.

curl "http://www.inscribe.ai/api/v1/customers/{customer_id}/documents/{document_id}" \
  -H "Authorization: YOUR_API_KEY"

The above command returns a JSON response which contains a URL that leads to detailed results when we are finished processing the document (more at Check Document).

Check Your First Document

The last step is to retrieve a detailed JSON response that contains the results from each of Inscribe's detection systems.

Authentication

To authorize, use this code:

const api = new InscribeAI('YOUR_API_KEY')
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
# Each cURL request requires the header to contain the authorization key as below.
  -H "Authorization: YOUR_API_KEY"

Make sure to replace YOUR_API_KEY with your API key.

Summary: Authenticate your requests with your API key.

Description: Inscribe uses API keys to allow access to our API. If you would like access to the Inscribe API please contact us.

Inscribe expects for the API key to be included in all API requests to the server in a header that looks like the following: Authorization: YOUR_API_KEY

Customers

Create Customer

Summary: Create a new customer folder

Description: This endpoint allows you to create customer folders to easily track and store documents. When checking a document you can simply add the customer name into the customer_name parameter to add a document to a particular customer folder.

api.createCustomer("NEW CUSTOMER 1").then((customer) => {
  let customerData = customer.data
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
api.create_customer("NEW CUSTOMER 1")
curl "http://www.inscribe.ai/api/v1/customers" \
  -H "Authorization: YOUR_API_KEY" \ 
  -d '{"customer_name": 'CUSTOMER_ID'}'

The above command returns JSON structured like this:

{  
  "success":true,
  "message":"Customer was successfully created",
  "data":{  
    "id":4,
    "customer_name":"NEW CUSTOMER 1",
    "url":"https://app.inscribe.ai/#/files/4"
  }
}

HTTP Request

POST /api/v1/customers/

Parameters

Name Located in Description Required Type
customer name body customer name no

Responses

Code Description
201 customer created

Get List of Customers

Summary: Returns list of all customers

Description: This endpoint allows you to get a list of all the customers you have created.

api.getAllCustomers().then((customers) => {
  let customersData = customers.data
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
all_customers = api.get_all_customers()
curl "http://www.inscribe.ai/api/v1/customers" \
  -H "Authorization: YOUR_API_KEY"

The above command returns JSON structured like this:

{  
  "success":true,
  "data":[  
    {  
      "id":1,
      "name":"NEW CUSTOMER 1",
      "url":"https://app.inscribe.ai/#/files/20"
    },
    {  
      "id":2,
      "name":"NEW CUSTOMER 2",
      "url":"https://app.inscribe.ai/#/files/21"
    }
  ]
}

HTTP Request

GET /api/v1/customers/

Responses

Code Description
200 search results matching criteria

Get Specific Customer

Summary: Returns link to web application.

Description: This endpoint returns the URL link to the web application. This is useful to quickly access the relevant dashboard page to perform further visual analysis.

api.getCustomer(customerId).then((customer) => {
  let customerData = customer.data
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
get_customer = api.get_customer(customer_id='CUSTOMER_ID')
curl "http://www.inscribe.ai/api/v1/customers/{customer_id}" \
  -H "Authorization: YOUR_API_KEY"

The above command returns JSON structured like this:

{  
  "success":true,
  "data":{  
    "id":1,
    "name":"NEW CUSTOMER 1",
    "url":"https://app.inscribe.ai/#/files/21"
  }
}

HTTP Request

GET /api/v1/customer/{customer_id}

Parameters

Name Located in Description Required Type
customer_id path customer id yes string

Responses

Code Description
200 successful operation

Delete Customer

Summary: Delete customer folder

Description: This endpoint allows you to delete a customer folder.

api.deleteCustomer(customerId).then((response) => {
  // check response if needed
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
api.delete_customer(customer_id='CUSTOMER_ID')

curl -X DELETE "http://www.inscribe.ai/api/v1/customers/{customer_id}" \
  -H "Authorization: YOUR_API_KEY"

The above command returns JSON structured like this:

{  
  "success":true,
  "message":"Customer was successfully deleted"
}

HTTP Request

DELETE /api/v1/customers/{customer_id}

Parameters

Name Located in Description Required Type
customer_id path customer id yes string

Responses

Code Description
200 successfully deleted

Documents

Upload Document

const document = fs.createReadStream('/path/to/document.pdf')
const name = "testDocument.pdf"
api.uploadDocument(customerId, document, name).then((response) => {
  let resultUrls = response.result_urls
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')

doc_obj = open("DOCUMENT_FILE_PATH", "rb+")
api.upload_document(customer_id='CUSTOMER_ID', document=doc_obj)
curl https://app.inscribe.ai/api/v1/customers/{customer_id}/documents /
  -H "Authorization: YOUR_API_KEY" /
  -F {document_filename}{.pdf, .png, .jpg}=@/{document_file_path}

The above command returns JSON structured like this:

{  
  "success":true,
  "message":"Successfully uploaded. Please poll returned URLs for results which will be available when processing is completed.",
  "result_urls":[  
    {  
      "filename":"example.pdf",
      "url":"https://app.inscribe.ai/api/v1/customers/2/documents/10"
    }
  ],
  "customer":{  
    "name":"test customer 1",
    "customer_id":2,
    "url":"https://app.inscribe.ai/#/files/2"
  }
}

Summary: Upload document for evaluation

Description: This endpoint allows you to upload one or more documents that you would like to be evaluated for fraud. Once the document(s) has been uploaded, it will be queued for processing by Inscribe's fraud detection algorithms. A JSON response containing a unique document_id is returned which can be used in the Check Document endpoint to retrieve the fraud detection results. You can upload documents in PDF, PNG or JPG format.

HTTP Request

POST /api/v1/customers/{customer_id}/documents

Parameters

Name Located in Description Required Type
customer_id path customer id yes string
document body document file yes object

Responses

Code Description
202 Accepted

Check Document

Summary: Get results of Inscribe's fraud evaluation

Description: This endpoint allows you to retrieve the fraud evaluation results of an uploaded document. A JSON response is returned with the results from each detection system in addition to an overall determination (under the is_fraudulent key). The overall determination returns a true/false answer to signal if any of our detectors found a suspicious document. Each of the detection results are briefly explained below.

The results from each detection system are split into good and bad results to allow you to see exactly how we arrived at our is_fraudulent decision. Within each good and bad result, we return a short description of the issue and the page where the issue arose under page_number.

api.checkDocument(customerId, documentId).then((response) => {
  // response will have success = true and contain document
  // object if fininshed processing. Otherwise success will be false.
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
new_customer = api.check_document(customer_id='CUSTOMER_ID',
                                  document_id='DOCUMENT_ID')
curl "http://www.inscribe.ai/api/v1/customers/{customer_id}/documents/{document_id}" \
  -H "Authorization: YOUR_API_KEY"

The above command returns JSON structured like this:

{
  "document": {
    "name": "test.pdf",
    "id": 1,
    "is_fraudulent": true,
    "customer": {
      "id": 1,
      "customer-dashboard-url": "https://app.inscribe.ai/#/files/1"
    },
    "created_at": "2019-01-15T11:41:15.843Z",
    "url": "https://app.inscribe.ai/api/v1/customers/1/documents/1",
    "forensics": {
      "fonts": {
        "bad": [],
        "good": [],
        "unknown": []
      },
      "metadata": {
        "bad": [
          {
            "page_number": 1,
            "description": "Creation and modification dates do not match"
          },
          {
            "page_number": 2,
            "description": "Produced by Adobe Photoshop"
          }
        ],
        "good": [],
        "unknown": []
      },
      "masking": {
        "bad": [],
        "good": [
          {
            "page_number": 1,
            "description": "No masked regions found"
          }
        ],
        "unknown": []
      }
    },
    "corroboration": {
      "addresses": [],
      "phone_numbers": [
        {
          "name": "test.pdf",
          "document_id": 1
        }
      ],
      "names": []
    },
    "databases": {
      "blacklists": {
        "bad": [],
        "good": [],
        "unknown": []
      },
      "matching_template": {
        "matched_template_name": "fraudulent_template.png",
        "similarity": 0.89
      }
    },
    "parsed_document": {
      "addresses": [],
      "phone_numbers": [
        "0897859855",
        "04588755985"
      ],
      "text_by_page": [
        {
          "page_number": 1,
          "text": "test text"
        }
      ]
    },
  },
  "success": true,
  "status": 200
}

HTTP Request

GET /api/v1/customers/{customer_id}/documents/{document_id}

Parameters

Name Located in Description Required Type
customer_id path customer id yes string
document_id path document id yes string

Responses

Code Description
200 ok

Understanding the Results

The following section explains the results of Inscribe's Forensics, Database and Corroboration detection systems.

1. Forensics

1.1 Metadata
The metadata response shows the metadata of a file, such as when it was created and which program it was created by. Not all files will have the same amount of information in the metadata, so some headings may not be present for some files.

What to look out for:
- Differing date of creation and date of modification
- A photo editing tool, such as Adobe Photoshop, as the document creator or producer

1.2 Fonts
The fonts analysis highlights the words in the document that contain inconsistent characters—those that are a different size or font to the rest of the word.

The font size measurement used in this analysis is accurate to three decimal places, so even if a forger has matched inserted text to its surroundings so well that it is indistinguishable to the human eye, this method can still detect the discrepancy.

1.3 Masking
A common forgery technique is to mask an element in a PDF with a rectangle matching the background color, and then to place new text on top of that rectangle. The masking analysis looks out for any of these instances.

2. Databases

Our database detection systems allow you to look out for known fraudulent documents and customer details. To do this we check if any names, addresses or phone numbers found in a document are blacklisted or if a template document has been used. Additionally, we check that if you have previously processed a particular documents.

2.1 Blacklists
The blacklists response displays any occurrence of blacklisted names, addresses or phone numbers. Names, addresses or phone numbers that are known to be used in fraudulent applications are a very effective way of detecting fraud. To add new blacklist entries, please see Blacklists.

2.2 Template Matching
The template response shows if a document has previously been used to submit an application or if the document is commonly used for creating fraudulent documents. A database of documents is automatically created when you upload a document. You can also manually add documents if you already have a collection of fraudulent documents that you would like to catch if they are ever used again. To add new template documents, please see Templates.

3. Corroboration

Our corroboration detections allows you to cross-check different pieces of information to ensure the documents all relate to each other and to the same customer.

3.1 Details Match
The corroboration response shows the result of our details matching systems that return any addresses or phone numbers that were matched between any customer documents. This allows you to ensure that each document belongs to the same person.

3.2 Signature Checks (Coming Soon)
The signature response show true if the signatures in any document match that of another document.

4. OCR Text

The parsed_document response returns the text content from a document—for both images and PDF documents—which you can use for further analysis or processing. Additionally, any addresses or phones number found in the document will be returned.

New Detectors

We have more detectors currently in development which we will announce in the coming weeks. For more information, please feel free to contact us.

Delete Document

Summary: Delete documents

Description: This endpoint allows you to delete a specific document.

api.deleteDocument(customerId, documentId).then((response) => {
  // check response if necessary
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
new_customer = api.delete_document(customer_id='CUSTOMER_ID',
                                   document_id='DOCUMENT_ID')
curl -X DELETE "http://www.inscribe.ai/api/v1/customers/{customer_name}/documents/{document_id}" \
  -H "Authorization: YOUR_API_KEY"

The above command returns JSON structured like this:

{  
  "success":true,
  "message":"Document was successfully deleted"
}

HTTP Request

DELETE /api/v1/customers/{customer_name}/documents/{document_id}

Parameters

Name Located in Description Required Type
customer_id path name of customer yes string
document_id path id of document yes string

Responses

Code Description
200 successful operation

Document Difference

api.documentDiff(customerId, documentOneId, documentTwoId).then((response) => {
  // check response if necessary
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
diff = api.document_diff(customer_id='CUSTOMER_ID', 
                         document_one_id='DOCUMENT_1_ID', 
                         document_two_id='DOCUMENT_2_ID')
curl http://www.inscribe.ai/api/v1/customers/{customer_id}/documents/diff?document_one_id=x&document_two_id=y \
  -H "Authorization: YOUR_API_KEY"

The above command returns JSON structured like this:

{
  "status": 200,
  "success": true,
  "diff": {
    "summary": "Text: 0 addition(s), 4 change(s), 0 deletion(s). Visual: 5 difference(s) across 1 page(s).",
    "url": "app.inscribe.ai/#/differences?document_one_id=1337&document_two_id=1729",
    "suspicious": true,
    "added": [
      {
        "lines": [
          "13th November, 2018"
        ],
        "page": 1,
        "locations": [[1], [2]]
      }
    ],
    "changed": [
      {
        "lines_from": [
          "Small Town, MO 3.14159"
        ],
        "page": 1,
        "lines_to": [
          "Small Town, MO 12345-6789"
        ],
        "locations": [[6], [6]]
      },
      {
        "lines_from": [
          "June 5, 2003"
        ],
        "page": 1,
        "lines_to": [
          "June 5, 2018"
        ],
        "locations": [[11], [11]]
      },
      {
        "lines_from": [
          "Beginning Balance on May 3, 2003"
        ],
        "page": 1,
        "lines_to": [
          "Beginning Balance on May 3, 2018"
        ],
        "locations": [[20], [20]]
      },
      {
        "lines_from": [
          "Ending Balance on June 5, 2018     2,521.19"
        ],
        "page": 1,
        "lines_to": [
          "Ending Balance on June 5, 2003    10,521.19"
        ],
        "locations": [[27],[27]]
      }
    ],
    "deleted": [
      {
        "lines": [
          "John Smith Bank Statement"
        ],
        "page": 1,
        "locations": [[30], [29]]
      }
    ],
    "visual": [
      {
        "page": 1,
        "differences": 5
      }
    ]
  }
}

Summary: Check if two documents are different

Description: This endpoint allows you to check if two documents are different. Upload your documents via the Document Upload endpoint and then use the returned document IDs of two different documents to query this endpoint. The response is split into sections that show the text that has been added, changed or deleted. In each section, the lines, page and locations (line numbers) of the modified text are returned.

As some changes may not appear in the text, this endpoint also returns a list of pages that have visually changed under the visual key. The response contains a page number for visual differences and also a url, which links to a visual display of the difference on the Inscribe dashboard.

HTTP Request

/api/v1/customers/{customer_id}/documents/diff?document_one_id=x&document_two_id=y

Parameters

Name Located in Description Required Type
document_one_id querystring id of first document yes integer
document_two_id querystring id of second document yes integer

Responses

Code Description
200 successful operation

Blacklists

Fraudulent customers often use the same names, addresses and phone numbers across applications. To avoid missing a reapplication of a fraudulent customer you can add their details to the blacklist. The results of this method are returned in the Check Document response.

Add New Blacklist Entry

Summary: Create blacklist entry

Description: If you would like to add a new blacklist entry you can use this API endpoint. For each entry, you can provide details (name, address, or phone number) that you would like Inscribe to look out for in the future. Going forward, all documents will be scanned for these details and you will be alerted in the Check Document response if the same details appear.

You can also add new blacklist entries or large CSV/Excel files by passing a file object ("csv", "xlsx", "xls") in the request.

api.createBlacklistEntry(name, phone, address).then((response) => {
  let blacklistEntry = response.entry
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
api.create_blacklist_entry(name="BLACKLISTED_NAME",
                           phone="BLACKLISTED_PHONE",
                           address="BLACKLISTED_ADDRESS")
curl "http://www.inscribe.ai/api/v1/blacklist" \
 -H "Authorization: YOUR_API_KEY" \ 
 -d '{"name": "BLACKLISTED_NAME", "phone": "BLACKLISTED_PHONE", "address": "BLACKLISTED_ADDRESS"}'

The above command returns JSON structured like this:

{  
  "message":"Entry was successfully created",
  "success":true,
  "entry":{  
    "name":"BLACKLISTED_NAME",
    "phone":"BLACKLISTED_PHONE",
    "address":"BLACKLISTED_ADDRESS"
  }
}

HTTP Request

POST /api/v1/blacklist

Parameters

Name Located in Description Required Type
blacklist entry body blacklist entry to add yes

Responses

Code Description
200 successful operation

Get All Blacklist Entries

Summary: Return all blacklist entries

Description: This method returns all blacklist entries which is useful if you would like to examine what is being search for.

api.getBlacklist().then((response) => {
  let blacklist = response.blacklist
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
api.get_blacklist()

curl "http://www.inscribe.ai/api/v1/blacklist" \
  -H "Authorization: YOUR_API_KEY"

The above command returns JSON structured like this:

{  
  "success":true,
  "blacklist":[  
    {  
      "id":1,
      "address":"BLACKLISTED_ADDRESS",
      "name":"BLACKLISTED_NAME",
      "phone":"BLACKLISTED_PHONE"
    },
    {  
      "id":2,
      "address":"BLACKLISTED_ADDRESS",
      "name":"BLACKLISTED_NAME",
      "phone":"BLACKLISTED_PHONE"
    },
    {  
      "id":3,
      "address":"BLACKLISTED_ADDRESS",
      "name":"BLACKLISTED_NAME",
      "phone":"BLACKLISTED_PHONE"
    }
  ]
}

HTTP Request

GET /api/v1/blacklist

Responses

Code Description
200 successful operation

Update Blacklist Entry

Summary: Update blacklist entry

Description: This method allows you to update a blacklist entry that already exists.

api.updateBlacklistEntry(blacklistEntryId, name, phone, address).then((response) => {
  let blacklist = response.entry
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
api.update_blacklist_entry(blacklist_id="BLACKLIST_ID",
                           name="BLACKLISTED_NAME",
                           phone="BLACKLISTED_PHONE",
                           address="BLACKLISTED_ADDRESS")
curl "http://www.inscribe.ai/api/v1/blacklist/{blacklist_id}" \
  -H "Authorization: YOUR_API_KEY" \ 
  -d '{"name": "BLACKLISTED_NAME", "phone": "BLACKLISTED_PHONE", "address": "BLACKLISTED_ADDRESS"}'

The above command returns JSON structured like this:

{  
  "message":"Entry was successfully updated",
  "success":true,
  "entry":{  
    "name":"BLACKLISTED_NAME",
    "phone":"BLACKLISTED_PHONE",
    "address":"BLACKLISTED_ADDRESS"
  }
}

HTTP Request

POST /api/v1/blacklist/{blacklist_id}

Parameters

Name Located in Description Required Type
blacklist_id path blacklist id yes integer
blacklist entry body blacklist entry to update yes

Responses

Code Description
200 successful operation

Delete Blacklist Entry

Summary: Delete blacklist entry

Description: This method allows you to delete a blacklist entry. This is useful if you find you no longer need to search for a particular identity or if you mistakenly added incorrect details.

api.deleteBlacklistEntry(blacklistEntryId).then((response) => {
  // Check response if needed
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
api.delete_blacklist_entry(blacklist_id="BLACKLIST_ID")

curl -X DELETE "http://www.inscribe.ai/api/v1/blacklist/{blacklist_id}" \
  -H "Authorization: YOUR_API_KEY" 

The above command returns JSON structured like this:

{  
  "message":"Entry was successfully deleted",
  "success":true
}

HTTP Request

DELETE /api/v1/blacklist/{blacklist_id}

Parameters

Name Located in Description Required Type
blacklist_id path blacklist id yes integer

Responses

Code Description
200 successful operation

Templates

Fraudulent documents are often created by modifying a real or fake document which is used as a template. This templating feature allows you to scan new documents to check if they match a previously used template. The results of this method are returned in the Check Document response.

Add New Template

Summary: Add a new template

Description: Use this API endpoint to add a new template document. The document can be either in PDF, PNG or JPG format.

const template = fs.createReadStream('/path/to/file.pdf')
const name = "testFile.pdf"
api.createTemplate(template, name).then((response) => {
  // Check response if needed
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')

template_obj = open("TEMPLATE_FILE_PATH", "rb+")
api.upload_template(document=template_obj)
curl "http://www.inscribe.ai/api/v1/templates"
  -H "Authorization: YOUR_API_KEY" 
  -F {document_filename}{.pdf, .png, .jpg}@/{document_file_path}

The above command returns JSON structured like this:

{  
  "message":"Successfully uploaded template.",
  "status":202,
  "success":true,
  "template":{  
    "filename":"bank_statement_forgery.pdf",
    "id":97,
    "template_text":"1111 Walnut Drive\nSan Francisco, CA\n\nJane Customer\n1234 Anywhere Dr.\nSmall Town, MO 3.14159 ..."
  }
}

HTTP Request

POST /api/v1/templates

Parameters

Name Located in Description Required Type
template body templates document to add yes

Responses

Code Description
200 successful operation

Get Template

Summary: Returns specific templates

Description: This method returns a specific template.

api.getTemplate(templateId).then((response) => {
  // Check response if needed
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
api.get_template(template_id="TEMPLATE_ID")
curl "http://www.inscribe.ai/api/v1/templates/{template_id}" \
  -H "Authorization: YOUR_API_KEY" 

The above command returns JSON structured like this:

{  
  "success":true,
  "template":[  
    {  
      "filename":"forged_utility_bill_1.png",
      "id":1,
      "template_text":"1111 Walnut Drive\nSan Francisco, CA\n\nJane Customer\n1234 Anywhere Dr.\nSmall Town, MO ..."
    }
  ]
}

HTTP Request

GET /api/v1/templates/{template_id}

Parameters

Name Located in Description Required Type
template_id path template id yes integer

Responses

Code Description
200 successful operation

Get All Templates

Summary: Return all templates

Description: This method returns all templates which is useful if you would like to examine what is being search for.

api.getTemplates().then((response) => {
  // Check response if needed
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
api.get_all_templates()
curl "http://www.inscribe.ai/api/v1/templates" \
  -H "Authorization: YOUR_API_KEY" 

The above command returns JSON structured like this:

{  
  "success":true,
  "templates":[  
    {  
      "filename":"forged_utility_bill_1.png",
      "id":1,
      "template_text":"1111 Walnut Drive\nSan Francisco, CA\n\nJane Customer\n1234 Anywhere Dr.\nSmall Town, MO ..."
    },
    {  
      "filename":"forged_bank_statement_1.pdf",
      "id":2,
      "template_text":"Total Deposits & Other Credits $3,615.08\n\nATM Withdrawals & Debits Account ... "
    }
  ]
}

HTTP Request

GET /api/v1/templates

Responses

Code Description
200 successful operation

Delete Template

Summary: Delete template document

Description: This method allows you to delete a template. This is useful if you find you no longer need to search for a particular template or if you mistakenly added a template.

api.deleteTemplate(templateId).then((response) => {
  // Check response if needed
})
import inscribe

api = inscribe.Client(api_key='YOUR_API_KEY')
api.delete_template(template_id="TEMPLATE_ID")
curl -X DELETE "http://www.inscribe.ai/api/v1/templates/{template_id}" \
  -H "Authorization: YOUR_API_KEY" 

HTTP Request

DELETE /api/v1/templates/{template_id}

Parameters

Name Located in Description Required Type
template_id path template id yes integer

Responses

Code Description
200 successful operation

Errors

The Inscribe API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The item requested is hidden for administrators only.
404 Not Found -- The specified item could not be found.
405 Method Not Allowed -- You tried to access a item with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The item requested has been removed from our servers.
429 Too Many Requests -- You're requesting too many items! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.