Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The doForms REST API provides integration with the doForms system.

...

Requests with a reseller token have access to account management endpoints for the customers of the reseller:

  • GET /accounts
  • GET /accounts/{key or code}
  • PUT /accounts/{key or code}
  • GET /devices?customerCodeaccount={customer key or code from /accounts}
  • GET /devices/{key or number}?customerCodeaccount={key or code}
  • GET /users?customerCodeaccount={key or code}
  • GET /users/{key or email}?customerCodeaccount={key or code}

Endpoints

...

GET /accounts?

Response
Notes
[
{
"key": "abc123",
"code": "acmeinc",
"administrator": {
"email": "me@me.com",
"firstName": "Bob",
"lastName": "Smith",
"workPhone": "1111111111"
},
"branded": true,
"credits": 10,
"licenses": 1,
"name": "Acme Inc Corp Ltd Pty",
"plan": {
"code": "pre02",
"name": "Premium"
},
"status": "Paid",
"active": true
},
{
"key": "abc124",
"code": "democo",
"administrator": {
"email": "me@me.com",
"firstName": "Bob",
"lastName": "Smith Jr",
",
"workPhone": "+5551231234"
},
"branded": true,
"credits": 10,
"licenses": 1,
"name": "Test company",
"plan": {
"code": "dem02",
"name": "Demo"
},
"status": "Canceled",
"active": false
}
]

Query customer accounts.

Requires a reseller token.

  • Possible query fields:
    • administrator.email

GET /accounts/current

ResponseNotes
{
"key": "abc123",
"code": "acmeinc",
"administrator": {
"email": "me@me.com",
"firstName": "Bob",
"lastName": "Smith",
"workPhone": "
+5551231234
1111111111"
  
},
"branded": true,
  "credits": 10,
"licenses": 1,
  "name": "
Test company
Acme Inc Corp Ltd Pty",
  
"plan": {
"code": "
dem02
pre02",
"name": "
Demo
Premium"
},
  
"status": "
Canceled
Paid",
"active": true
}
]Query customer accounts

Returns information about the current account.

  • Requires
a reseller
  • user token authentication.
  • Possible query fields:
    • administrator.email

GET /accounts/

...

{key or code}

ResponseNotes
{
"key": "abc123",
"code": "acmeinc",
"administrator": {
"email": "me@me.com",
"firstName": "Bob",
"lastName": "Smith",
"workPhone": "1111111111"
},
"branded": true,
"credits": 10,
"licenses": 1,
"name": "Acme Inc Corp Ltd Pty",
"plan": {
"code": "pre02",
"name": "Premium"
},
"status": "Paid",
"active": true
}

Get the account. 

  • Requires reseller token authentication.

PUT /accounts/{key or code}

BodyNotes
{
"active": true
}

Returns information about Update the current account.

  • Requires user active - Set to true to activate the account, false to deactivate the account. Requires reseller token authentication.

GET /activity?

...

ResponseNotes
[
{
"key": "rst123",
"id": "acme$$12345$$Published&&1"
},
{
"key": "rst124",
"id": "acme$$12345$$Published&&2"
}
]

Returns dispatch identifiers that match a query.

See /submissions? for more details.

DELETE /dispatches/{key or id}

...

ResponseNotes
[
{
"key": "fgh123",
"id": "acme$$12345$$Published",
"name": "First Form v1",
"displayName": "First Form",
"createTime": "2019-08-20T16:55:20.130Z",
"createUser": "me@me.com",
"updateTime": "2019-08-20T17:55:21.799Z",
"updateUser": "me@me.com",
"version": 1.01
},
{
"key": "fgh234",
"id": "acme$$23456$$Published",
"name": "Second Form",
"displayName": "Second Form",
"createTime": "2019-07-20T16:55:20.130Z",
"createUser": "me@me.com",
"updateTime": "2019-07-20T17:55:21.799Z",
"updateUser": "me@me.com",
"version": 1.0
}
]

Returns all forms assigned to the requested project.

  • See the /forms endpoint for more detail.
  • Set optional query parameter @abandoned=true to include forms that have data for the project but are not assigned to the project. Ignored if the authenticated user does not have rights to view abandoned data.

GET /reports

ResponseNotes
[
{
"key": "rst123",
"name": "Report 1"
},
{
"key": "rst124",
"name": "Report 2"
},
{
"key": "rst125",
"name": "Report 3"
}
]

Returns all published reports.

  • Requires report manager rights.

...


BodyNotes
Request
{
"type":"pdf",
"templateKey":"tuv123",
  "submissionKey":"stu123"
}

Start a task.

  • type - The task type.
    • pdf - Convert the submission specified in submissionKey to a PDF file.  Contact Contact support@doforms.com to enable PDF generation.
  • templateKey - (optional) The template to use when generating a PDF file. Get the template key at /templates.
  • submissionKey - The submission to convert to a PDF file.
200 OK
{
  "key": "vwz123",
  "type": "pdf",
  "complete": false,
  "createTime": "2023-12-13T19:27:57.350Z"
}

Returns the task with the current status.

Most tasks will have complete=false when created. Check the status at GET /tasks/{key}.

...