Dispatch

The dispatches API lets you retrieve and filter all dispatches created by admins in your organization.

Get Dispatches

GET https://api.developer.databeaver.co/v1/dispatches

Returns a list of all dispatches in your organisation.

Query Parameters

NameTypeDescription

sortOrder

string

asc | desc [Default: asc]

dispatchType

string

basic | prefilled | hybrid | survey

name

string

Name of dispatch

status

string

draft | supended | dispatch | completed

form

string

Id of the dispatch form

project

string

Id of the dispatch project

agent

string

Id of the agent that was a recipient of the dispatch

page

number

[Default: 1]

perPage

number

[Default: 50]

sortBy

string

createdAt | name | dispatchType [Default: id]

Headers

NameTypeDescription

Authorization

string

Bearer API_KEY

{
    "success": true,
    "data": [
        {
            "id": "5efdd89d41912a1ab1717324",
            "recipients": {
                "agents": [
                   {
                       "id": "5efdd87941912a1ab16fec84"
                   }
                ],
                "agentGroups": []
            },
            "dispatchType": "basic",
            "status": "dispatched",
            "name": "Test Dispatch",
            "createdBy": {
                "id": "5ef9ced34ba08a2aac9b83cd",
                "status": "active",
                "firstName": "Test",
                "lastName": "Admin",
                "email": "test1@test.com",
                "createdAt": "2020-06-29T11:21:55.406Z",
                "updatedAt": "2020-06-29T11:21:55.406Z",
                "lastLogin": "2020-06-29T11:21:55.406Z"
            },
            "modifiedBy": {
                "id": "5ef9ced34ba08a2aac9b83cd",
                "status": "active",
                "firstName": "Test",
                "lastName": "Admin",
                "email": "test1@test.com",
                "createdAt": "2020-06-29T11:21:55.406Z",
                "updatedAt": "2020-06-29T11:21:55.406Z",
                "lastLogin": "2020-06-29T11:21:55.406Z"
            },
            "form": "5ef9cf094ba08a2aac9e912a",
            "project": "5efd9b5cda30d50b26c495dd",
            "totalExpectedEntries": 959,
            "createdAt": "2020-07-08T12:29:11.447Z",
            "updatedAt": "2020-07-08T12:29:11.447Z"
        },
        ...
    ],
    "_metadata": {
        "total": 1073988,
        "perPage": 5,
        "pageCount": 214798,
        "pageLinks": {
            "current": "https://api.databeaver.co/v1/dispatches?project=5efd9b5cda30d50b26c495dd&perPage=5&page=1",
            "next": "https://api.databeaver.co/v1/dispatches?project=5efd9b5cda30d50b26c495dd&perPage=5&page=2"
        }
    }
}

Get Dispatch by Id

GET https://api.developer.databeaver.co/v1/dispatches/:id

Returns a single dispatch using the dispatch id

Path Parameters

NameTypeDescription

id

string

Dispatch id

Headers

NameTypeDescription

Authorization

string

Bearer API_KEY

{
    "success": true,
    "data": {
        "id": "5efdd89d41912a1ab1717324",
        "instructions": {
            "instructions": "Fill the form in this format",
            "attachments": []
        },
        "recipients": {
            "agents": [
                {
                    "id": "5efdd87941912a1ab16fec84",
                    "status": "active",
                    "firstName": "Test",
                    "lastName": "Agent",
                    "email": "test@databeaver.co",
                    "phone": "080123456701",
                    "location": [
                        {
                            "country": "Nigeria",
                            "zone": "South West",
                            "state": "Lagos",
                            "city": "Lagos"
                        }
                    ],
                    "createdAt": "2020-06-23T07:55:12.914Z",
                    "updatedAt": "2020-07-07T09:33:11.353Z",
                    "lastLogin": "2020-06-23T07:56:18.032Z"
                }
            ],
            "agentGroups": []
        },
        "dispatchType": "basic",
        "status": "dispatched",
        "name": "Test Dispatch",
        "startDate": "2020-07-01T00:00:00.000Z",
        "dueDate": "2020-07-30T00:00:00.000Z",
        "form": {
            "id": "5ef9cf094ba08a2aac9e912a",
            "dispatched": true,
            "status": "active",
            "name": "Test Form",
            "sector": "IT",
            "reason": "Customer Research",
            "createdAt": "2020-06-25T16:05:14.083Z",
            "updatedAt": "2020-06-26T11:19:09.469Z"
        },
        "project": {
            "id": "5efd9b5cda30d50b26c495dd",
            "name": "Test Project",
            "createdAt": "2020-06-26T00:28:59.530Z",
            "updatedAt": "2020-07-08T12:29:11.470Z"
        },
        "createdBy": {
            "id": "5ef9ced34ba08a2aac9b83cd",
            "status": "active",
            "firstName": "Test",
            "lastName": "Admin",
            "email": "test1@test.com",
            "createdAt": "2020-06-29T11:21:55.406Z",
            "updatedAt": "2020-06-29T11:21:55.406Z",
            "lastLogin": "2020-06-29T11:21:55.406Z"
        },
        "modifiedBy": {
            "id": "5ef9ced34ba08a2aac9b83cd",
            "status": "active",
            "firstName": "Test",
            "lastName": "Admin",
            "email": "test1@test.com",
            "createdAt": "2020-06-29T11:21:55.406Z",
            "updatedAt": "2020-06-29T11:21:55.406Z",
            "lastLogin": "2020-06-29T11:21:55.406Z"
        },
        "createdAt": "2020-07-08T12:29:11.447Z",
        "updatedAt": "2020-07-08T12:29:11.447Z"
    }
}

Last updated