# Create an ActivityDefinition

{% hint style="warning" %}
Applications that can be launched MUST be the publisher of the `ActivityDefinition`.&#x20;
{% endhint %}

Koppeltaal adds three [extensions](https://simplifier.net/koppeltaalv2.0/kt2activitydefinition) to the `ActivityDefinition` resource:

<figure><img src="https://1577345028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiVMn-5GzUw-bGYHPT8%2Fuploads%2Fgit-blob-3c89fe2f9f2050ab8a97e161f2b4a8dbc4121554%2FScreenshot%202023-02-09%20at%2009.25.51.png?alt=media" alt=""><figcaption></figcaption></figure>

| Extension       | Description                                                                                                                                                                                                                                                                                                                                                                                                  |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| endpoint        | Every `ActivityDefinition` must refer to an `Endpoint` Resource. The value of this `Endpoint` must be filled with the URL that the user is sent to while launching a `Task` that uses this `ActivityDefinition`                                                                                                                                                                                              |
| publisherId     | A unique identifier for the client publishing the `ActivityDefinition`. This can be used to, for example, retrieve all Tasks that refer to any `ActivityDefinition` from publisher ***X***. This can be very useful for subscribing to changes in `Tasks` that are relevant to your application. This value requires an `id` type value, allowing more freedom of "groups" than the `resource-origin` field. |
| resource-origin | A reference to the `Device` that created the Resource. This is set by the Koppeltaal server as it's used by the [authorisation mechanism](https://devguide.koppeltaal.nl/domain-access/rollen-beheren/autorisatiemodel). This value cannot be set by the client while creating new Resources.                                                                                                                |

### Example ActivityDefinition

```javascript
{
    "resourceType": "ActivityDefinition",
    "meta": {
        "profile": [
            "http://koppeltaal.nl/fhir/StructureDefinition/KT2ActivityDefinition"
        ]
    },
    "extension": [
        {
            "url": "http://koppeltaal.nl/fhir/StructureDefinition/KT2PublisherIdentifier",
            "valueId": "ID345900-002"
        },
        {
            "url": "http://koppeltaal.nl/fhir/StructureDefinition/KT2EndpointExtension",
            "valueReference": {
                "reference": "Endpoint/04230feb-8cf6-458b-bb46-409430f64701",
                "type": "Endpoint"
            }
        }
    ],
    "url": "http://Testtooling.com/ActivityDefinition/",
    "identifier": [
        {
            "use": "official",
            "system": "http:/vzvz.nl/Testtooling",
            "value": "Controlelijst voortgang"
        }
    ],
    "version": "1.1.0",
    "name": "Controlelijst",
    "title": "Controlelijst voortgang",
    "status": "active",
    "description": "Vul de controlelijst zo goed mogelijk in. Dit kost ongeveer 10 minuten."
}
```
