Invites

Get all invites

You can retrieve all invites.

GET /invite/ HTTP/1.1
Host: [DIGITA_HOST]
Authorization: Bearer [ACCESS_TOKEN]
[
    {
        "uri": "http://example.org/invite/1",
        "exchange": null,
        "holder": "http://example.org/holder/lucy",
        "state": "not linked",
        "purpose": "http://example.org/purpose/1",
        "connection": null,
        "created": "1611566267000",
        "expires": "1640995200000",
        "accepted": null
    }
]

Get one invite

You can retrieve a single invite.

GET /invite/[SOURCE_URI] HTTP/1.1
Host: [DIGITA_HOST]
Authorization: Bearer [ACCESS_TOKEN]
{
    "uri": "http://example.org/invite/1",
    "exchange": null,
    "holder": "http://example.org/holder/lucy",
    "state": "not linked",
    "purpose": "http://example.org/purpose/1",
    "connection": null,
    "created": "1611566267000",
    "expires": "1640995200000",
    "accepted": null
}

Create one invite

You can create a single invite.

POST /invite/ HTTP/1.1
Host: [DIGITA_HOST]
Authorization: Bearer [ACCESS_TOKEN]

{
    "uri": "http://example.org/invite/1",
    "exchange": null,
    "holder": "http://example.org/holder/lucy",
    "state": "not linked",
    "purpose": "http://example.org/purpose/1",
    "connection": null,
    "created": "1611566267000",
    "expires": "1640995200000",
    "accepted": null
}
{
    "uri": "http://example.org/invite/1",
    "exchange": null,
    "holder": "http://example.org/holder/lucy",
    "state": "not linked",
    "purpose": "http://example.org/purpose/1",
    "connection": null,
    "created": "1611566267000",
    "expires": "1640995200000",
    "accepted": null
}

Update one invite

You can update a single invite.

PUT /invite/[SOURCE_URI] HTTP/1.1
Host: [DIGITA_HOST]
Authorization: Bearer [ACCESS_TOKEN]

{
    "uri": "http://example.org/invite/1",
    "exchange": null,
    "holder": "http://example.org/holder/lucy",
    "state": "not linked",
    "purpose": "http://example.org/purpose/1",
    "connection": null,
    "created": "1611566267000",
    "expires": "1640995200000",
    "accepted": null
}
{
    "uri": "http://example.org/invite/1",
    "exchange": null,
    "holder": "http://example.org/holder/lucy",
    "state": "not linked",
    "purpose": "http://example.org/purpose/1",
    "connection": null,
    "created": "1611566267000",
    "expires": "1640995200000",
    "accepted": null
}

You can generate an invite link.

GET /invite/[SOURCE_URI]/link HTTP/1.1
Host: [DIGITA_HOST]
Authorization: Bearer [ACCESS_TOKEN]
{
    "inviteLink": "..."
}

Get all invites for a holder

You can retrieve all invites which belong to a specific holder.

GET /holder/[HOLDER_URI]/connections HTTP/1.1
Host: [DIGITA_HOST]
Authorization: Bearer [ACCESS_TOKEN]
[
    {
        "uri": "http://example.org/invite/1",
        "exchange": null,
        "holder": "http://example.org/holder/lucy",
        "state": "not linked",
        "purpose": "http://example.org/purpose/1",
        "connection": null,
        "created": "1611566267000",
        "expires": "1640995200000",
        "accepted": null
    }
]