-
Notifications
You must be signed in to change notification settings - Fork 0
Forms
Forms are documents which are classified and recognised by GlyphX. So, in order to process any document a form need to be created and processed. Forms APIs allows to create, update and delete forms programatically. All the APIs have to be aunthenticated either using Basic Auth or Session Auth
Gets all the forms belonging to the user
GET /forms/
For Session Auth
Content-Type=application/json
sessionid=<valid sessionid>
For Basic Auth
Content-Type=application/json
Authorization=<base64 encoded username, password combination>
None
Response will be a JSON providing the list of forms
{
"objects": [
{
"form_num": "scan jpeg",
"id": "56386711aa762006fddd2598",
"resource_uri": "/forms/56386711aa762006fddd2598/"
},
{
"form_num": "Scan 3",
"id": "563865bcaa762006fddd2585",
"resource_uri": "/forms/563865bcaa762006fddd2585/"
},
{
"form_num": "Scan 3",
"id": "563851d5aa762006fddd2572",
"resource_uri": "/forms/563851d5aa762006fddd2572/"
}
],
"meta": {
"total_count": 103,
"limit": 20,
"offset": 0
}
Gets the details of a single form
GET /forms/<id>
For Session Auth
Content-Type=application/json
sessionid=<valid sessionid>
For Basic Auth
Content-Type=application/json
Authorization=<base64 encoded username, password combination>
None
Response will be a JSON providing the detail information about the form
{
"objects": {
"account": "mquotient(53dhc987c5a4b3396ebe9a9b)",
"template": null,
"form_num": "scan jpeg",
"id": "56386711aa762006fddd2598",
"resource_uri": "/forms/56386711aa762006fddd2598/pages/"
},
"meta": {
"total_count": 1,
"limit": 20,
"offset": 0
}
}
Creating a form involves two steps
- Creating the form using the first page in form
- Updating the form with additional pages of the form if there are any
As soon as the each page is received, they will be scheduled for processing. Any processing steps that require data from more than one page will wait till all the required pages are received. While creating or updating the form, the image for the page is required to be provided. GlyphX provides two options for sending the image
- The image can be sent as base64 encoded string and part of the
POSTdata. - The image can be sent as a raw file using
# Create the form using the first page
POST /forms/
For Session Auth
Content-Type=application/json
sessionid=<valid sessionid>
For Basic Auth
Content-Type=application/json
Authorization=<base64 encoded username, password combination>
None
Response will be a JSON providing the detail information about the form
{
"objects": {
"account": "mquotient(53dhc987c5a4b3396ebe9a9b)",
"template": null,
"form_num": "scan jpeg",
"id": "56386711aa762006fddd2598",
"resource_uri": "/forms/56386711aa762006fddd2598/pages/"
},
"meta": {
"total_count": 1,
"limit": 20,
"offset": 0
}
}