Skip to main content
POST
/
v1
/
org
/
system-integrations
Create System Integration
curl --request POST \
  --url https://api.twine.se/v1/org/system-integrations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "system_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
  "auth": {
    "api_key": "<string>",
    "slug": "twenty_four_seven"
  },
  "create_default_mappings": true,
  "description": "<string>",
  "system_custom": {
    "slug": "agda_file"
  },
  "template_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b"
}
'
{
  "data": {
    "id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
    "org_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
    "system_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
    "api_client_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
    "api_endpoint_url": "https://your-company.api.example.com/v1",
    "domain_mappings": [
      {
        "enabled": true,
        "from_domain": "employee",
        "id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
        "org_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
        "source_system_integration_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
        "target_system_integration_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
        "to_domain": "employee",
        "conditions": [
          {
            "apply_on_actions": [
              "create"
            ],
            "condition": {},
            "domain": "employee",
            "enabled": true,
            "id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
            "description": "<string>"
          }
        ],
        "sync_triggers": [
          {
            "domain_mapping_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
            "id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
            "org_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
            "system_integration_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
            "cron_expression": "0 0 * * *",
            "domain_configuration": {
              "domain": "time_report",
              "from_date": "2023-12-25",
              "from_date_engine": {},
              "to_date": "2023-12-25",
              "to_date_engine": {}
            },
            "last_sync_ended_at": "2023-01-01T00:00:00Z",
            "last_sync_started_at": "2023-01-01T00:00:00Z",
            "next_sync_at": "2023-01-01T00:00:00Z",
            "parent_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b"
          }
        ]
      }
    ],
    "external_org_id": "<string>",
    "inserted_at": "2021-06-01T12:00:00Z",
    "property_mappings": [
      {
        "common_domain": "employee",
        "common_path": [
          "salary_amount"
        ],
        "id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
        "org_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
        "system_domain": "employee",
        "system_integration_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
        "system_path": [
          "salaries",
          "[]",
          "amount"
        ],
        "converters": [
          {
            "converter": "string_to_integer",
            "pod_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b"
          }
        ],
        "enabled": true,
        "engine": {
          "domain": "employee",
          "engine": {},
          "version": "2",
          "description": "This engine maps properties from one format to another."
        },
        "reference_domain": "employee",
        "version": 2
      }
    ],
    "system": {
      "id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
      "kind": "other",
      "name": "Evity HR",
      "slug": "twine",
      "logo_url": "https://example.com/logos/system-logo.png"
    },
    "system_custom": {
      "slug": "agda_file"
    },
    "updated_at": "2021-06-01T12:00:00Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer token for authentication

Body

application/json

System Integration Create Request

Schema for creating a system integration

system_id
string<uuid>
required

The UUID of the system to integrate with

Example:

"018eae56-8f9d-7ca0-bea3-17f3db6cf75b"

auth
TwentyFourSevenAuth · object

Schema for TwentyFourSeven authentication

create_default_mappings
boolean | null

Whether to create default domain mappings for the integration. Has no effect if template_id is specified and valid.

Example:

true

description
string | null

Optional description of the system integration

system_custom
AgdaFileSystemCustom · object

Custom configuration for Agda File system integrations.

template_id
string<uuid> | null

Optional UUID of the template to use for the integration. Specifying a non-existing template, or an incompatible template will result in a 400 response.

Example:

"018eae56-8f9d-7ca0-bea3-17f3db6cf75b"

Response

System Integration Response

A response object with a single system integration

data
SystemIntegration · object
required

An object representing a system integration in Twine.