Subscriptions (NBA Live 18)

GET /organizer/v2/webhooks/{webhook_id}/subscriptions

Authorized Access

Returns subscriptions of a webhook.

Resource URL

https://api.toornament.com/organizer/v2/webhooks/{webhook_id}/subscriptions

HTTP headers

  • X-Api-Key
    string

    API key of your application (see Authentication)

  • Authorization
    string

    Access token (see Authorization)

  • Range
    string

    A range of requested items using the subscriptions unit. The size of the range cannot exceed 50. (see Pagination)

    Example: subscriptions=0-49

Path parameters

  • webhook_id
    string

    The id of the subscription's webhook.

    Example: 378426939508809728

Query Parameters

This endpoint doesn't have any query parameters.

Request Body

This endpoint doesn't require a request body.

Response

[206] Webhooks retrieved

Example
[
    {
        "id": "378426939508809728",
        "event_name": "registration.created",
        "scope": "tournament",
        "scope_id": "842693950880972837"
    }
]
Structure (collection)
  • id
    string

    An unique identifier for the subscription

    Example: "378426939508809728"

  • event_name
    string

    The event name you want to subscribe

    Possible values: registration.created, registration.info_updated, registration.accepted, registration.refused, registration.reset, registration.cancelled, registration.deleted, participant.checked_in, participant.unchecked_in, participant.created, participant.deleted, participant.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed

  • scope
    string

    The scope you want to subscribe

    Possible values: tournament

  • scope_id
    string

    An unique identifier of the scope

    Example: "842693950880972837"

POST /organizer/v2/webhooks/{webhook_id}/subscriptions

Authorized Access

Create a new subscription

Resource URL

https://api.toornament.com/organizer/v2/webhooks/{webhook_id}/subscriptions

HTTP headers

Path parameters

  • webhook_id
    string

    The id of the subscription's webhook.

    Example: 378426939508809728

Query Parameters

This endpoint doesn't have any query parameters.

Request Body

Subscription data

Example
{
    "event_name": "registration.created",
    "scope": "tournament",
    "scope_id": "842693950880972837"
}
Structure (object)
  • event_name
    string

    The event name you want to subscribe

    Possible values: registration.created, registration.info_updated, registration.accepted, registration.refused, registration.reset, registration.cancelled, registration.deleted, participant.checked_in, participant.unchecked_in, participant.created, participant.deleted, participant.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed

  • scope
    string

    The scope you want to subscribe

    Possible values: tournament

  • scope_id
    string

    An unique identifier of the scope

    Example: "842693950880972837"

Response

[201] Subscription created

Example
{
    "id": "378426939508809728",
    "event_name": "registration.created",
    "scope": "tournament",
    "scope_id": "842693950880972837"
}
Structure (object)
  • id
    string

    An unique identifier for the subscription

    Example: "378426939508809728"

  • event_name
    string

    The event name you want to subscribe

    Possible values: registration.created, registration.info_updated, registration.accepted, registration.refused, registration.reset, registration.cancelled, registration.deleted, participant.checked_in, participant.unchecked_in, participant.created, participant.deleted, participant.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed

  • scope
    string

    The scope you want to subscribe

    Possible values: tournament

  • scope_id
    string

    An unique identifier of the scope

    Example: "842693950880972837"

GET /organizer/v2/webhooks/{webhook_id}/subscriptions/{id}

Authorized Access

Returns a subscription identified by the given id.

Resource URL

https://api.toornament.com/organizer/v2/webhooks/{webhook_id}/subscriptions/{id}

HTTP headers

Path parameters

  • webhook_id
    string

    The id of the subscription's webhook.

    Example: 378426939508809728

  • id
    string

    The id of the subscription to retrieve

Query Parameters

This endpoint doesn't have any query parameters.

Request Body

This endpoint doesn't require a request body.

Response

[200] Subscription retrieved

Example
{
    "id": "378426939508809728",
    "event_name": "registration.created",
    "scope": "tournament",
    "scope_id": "842693950880972837"
}
Structure (object)
  • id
    string

    An unique identifier for the subscription

    Example: "378426939508809728"

  • event_name
    string

    The event name you want to subscribe

    Possible values: registration.created, registration.info_updated, registration.accepted, registration.refused, registration.reset, registration.cancelled, registration.deleted, participant.checked_in, participant.unchecked_in, participant.created, participant.deleted, participant.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed

  • scope
    string

    The scope you want to subscribe

    Possible values: tournament

  • scope_id
    string

    An unique identifier of the scope

    Example: "842693950880972837"

PATCH /organizer/v2/webhooks/{webhook_id}/subscriptions/{id}

Authorized Access

If you need to make changes on your subscription data, you are able to do so by patching one or several fields of your subscription.

Resource URL

https://api.toornament.com/organizer/v2/webhooks/{webhook_id}/subscriptions/{id}

HTTP headers

Path parameters

  • webhook_id
    string

    The id of the subscription's webhook.

    Example: 378426939508809728

  • id
    string

    The id of the subscription to patch

Query Parameters

This endpoint doesn't have any query parameters.

Request Body

Subscription data

Example
{
    "event_name": "registration.created",
    "scope": "tournament",
    "scope_id": "842693950880972837"
}
Structure (object)
  • event_name
    string

    Optional

    The event name you want to subscribe

    Possible values: registration.created, registration.info_updated, registration.accepted, registration.refused, registration.reset, registration.cancelled, registration.deleted, participant.checked_in, participant.unchecked_in, participant.created, participant.deleted, participant.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed

  • scope
    string

    Optional

    The scope you want to subscribe

    Possible values: tournament

  • scope_id
    string

    Optional

    An unique identifier of the scope

    Example: "842693950880972837"

Response

[200] Success

Example
{
    "id": "378426939508809728",
    "event_name": "registration.created",
    "scope": "tournament",
    "scope_id": "842693950880972837"
}
Structure (object)
  • id
    string

    An unique identifier for the subscription

    Example: "378426939508809728"

  • event_name
    string

    The event name you want to subscribe

    Possible values: registration.created, registration.info_updated, registration.accepted, registration.refused, registration.reset, registration.cancelled, registration.deleted, participant.checked_in, participant.unchecked_in, participant.created, participant.deleted, participant.info_updated, tournament.registration_opened, tournament.registration_closed, tournament.check_in_opened, tournament.check_in_closed

  • scope
    string

    The scope you want to subscribe

    Possible values: tournament

  • scope_id
    string

    An unique identifier of the scope

    Example: "842693950880972837"

DELETE /organizer/v2/webhooks/{webhook_id}/subscriptions/{id}

Authorized Access

Delete a subscription.

Resource URL

https://api.toornament.com/organizer/v2/webhooks/{webhook_id}/subscriptions/{id}

HTTP headers

Path parameters

  • webhook_id
    string

    The id of the subscription's webhook.

    Example: 378426939508809728

  • id
    string

    The id of the subscription to delete

Query Parameters

This endpoint doesn't have any query parameters.

Request Body

This endpoint doesn't require a request body.

Response

[204] Success