Deel · Capability

Endpoints — subpackage_contracts

Endpoints — subpackage_contracts. 4 operations. Lead operation: Create a new contract. Self-contained Naftiko capability covering one Deel business surface.

Run with Naftiko Deelsubpackage_contracts

What You Can Do

POST
Createiccontract — Create a new contract
/v1/contracts
GET
Getcontracts — List of contracts
/v1/contracts
PATCH
Updateiccontract — Add external Id
/v1/contracts/{contract-id}
GET
Getcontract — Retrieve a single contract
/v1/contracts/{contract-id}

MCP Tools

create-new-contract

Create a new contract

list-contracts

List of contracts

read-only idempotent
add-external-id

Add external Id

idempotent
retrieve-single-contract

Retrieve a single contract

read-only idempotent

Capability Spec

contracts-endpoints-subpackage-contracts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Endpoints — subpackage_contracts
  description: 'Endpoints — subpackage_contracts. 4 operations. Lead operation: Create a new contract. Self-contained Naftiko
    capability covering one Deel business surface.'
  tags:
  - Deel
  - subpackage_contracts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    DEEL_API_KEY: DEEL_API_KEY
capability:
  consumes:
  - type: http
    namespace: contracts-endpoints-subpackage-contracts
    baseUri: https://api.letsdeel.com/rest/v2
    description: Endpoints — subpackage_contracts business capability. Self-contained, no shared references.
    resources:
    - name: contracts
      path: /contracts
      operations:
      - name: createiccontract
        method: POST
        description: Create a new contract
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: Authorization
          in: header
          type: string
          description: '## Authentication'
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: getcontracts
        method: GET
        description: List of contracts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: after_cursor
          in: query
          type: string
          description: Return next page of results after the given cursor.
        - name: limit
          in: query
          type: string
          description: Return a page of results with the given number of records.
        - name: order_direction
          in: query
          type: string
          description: Order direction of results; ascending or descending.
        - name: types
          in: query
          type: array
          description: Filter contracts by type. A contract is included in the results if its type is in this list.
        - name: statuses
          in: query
          type: array
          description: Filter contracts by current status. A contract is included in the results if its status is in this
            list.
        - name: team_id
          in: query
          type: string
          description: 'Filter contracts for the given team ID. NOTE: All query parameters are technically strings or arrays
            of strings.'
        - name: external_id
          in: query
          type: string
          description: Filter contracts for the given external ID.
        - name: external_id_absent
          in: query
          type: string
          description: Filter contracts by external ID presence. When true, returns contracts without an external ID. When
            false, returns contracts with an external ID. Cannot be used
        - name: countries
          in: query
          type: array
          description: Filter contracts by country codes.
        - name: currencies
          in: query
          type: string
          description: Filter contracts by currency codes.
        - name: search
          in: query
          type: string
          description: Include a contract if its name or the contractor's name contains the given search term.
        - name: sort_by
          in: query
          type: string
          description: Sort contracts by the given field name.
        - name: expand
          in: query
          type: string
          description: Include cost centers in the response.
        - name: Authorization
          in: header
          type: string
          description: '## Authentication'
          required: true
    - name: contracts-contract_id
      path: /contracts/{contract_id}
      operations:
      - name: updateiccontract
        method: PATCH
        description: Add external Id
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: contract_id
          in: path
          type: string
          description: Deel contract id.
          required: true
        - name: Authorization
          in: header
          type: string
          description: '## Authentication'
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: getcontract
        method: GET
        description: Retrieve a single contract
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: contract_id
          in: path
          type: string
          description: Unique identifier of the contract.
          required: true
        - name: expand
          in: query
          type: string
          description: Include cost centers in the response.
        - name: Authorization
          in: header
          type: string
          description: '## Authentication'
          required: true
    authentication:
      type: bearer
      token: '{{env.DEEL_API_KEY}}'
  exposes:
  - type: rest
    namespace: contracts-endpoints-subpackage-contracts-rest
    port: 8080
    description: REST adapter for Endpoints — subpackage_contracts. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/contracts
      name: contracts
      description: REST surface for contracts.
      operations:
      - method: POST
        name: createiccontract
        description: Create a new contract
        call: contracts-endpoints-subpackage-contracts.createiccontract
        with:
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getcontracts
        description: List of contracts
        call: contracts-endpoints-subpackage-contracts.getcontracts
        with:
          after_cursor: rest.after_cursor
          limit: rest.limit
          order_direction: rest.order_direction
          types: rest.types
          statuses: rest.statuses
          team_id: rest.team_id
          external_id: rest.external_id
          external_id_absent: rest.external_id_absent
          countries: rest.countries
          currencies: rest.currencies
          search: rest.search
          sort_by: rest.sort_by
          expand: rest.expand
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/contracts/{contract-id}
      name: contracts-contract-id
      description: REST surface for contracts-contract_id.
      operations:
      - method: PATCH
        name: updateiccontract
        description: Add external Id
        call: contracts-endpoints-subpackage-contracts.updateiccontract
        with:
          contract_id: rest.contract_id
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getcontract
        description: Retrieve a single contract
        call: contracts-endpoints-subpackage-contracts.getcontract
        with:
          contract_id: rest.contract_id
          expand: rest.expand
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: contracts-endpoints-subpackage-contracts-mcp
    port: 9090
    transport: http
    description: MCP adapter for Endpoints — subpackage_contracts. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: create-new-contract
      description: Create a new contract
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: contracts-endpoints-subpackage-contracts.createiccontract
      with:
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-contracts
      description: List of contracts
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: contracts-endpoints-subpackage-contracts.getcontracts
      with:
        after_cursor: tools.after_cursor
        limit: tools.limit
        order_direction: tools.order_direction
        types: tools.types
        statuses: tools.statuses
        team_id: tools.team_id
        external_id: tools.external_id
        external_id_absent: tools.external_id_absent
        countries: tools.countries
        currencies: tools.currencies
        search: tools.search
        sort_by: tools.sort_by
        expand: tools.expand
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: add-external-id
      description: Add external Id
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: contracts-endpoints-subpackage-contracts.updateiccontract
      with:
        contract_id: tools.contract_id
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: retrieve-single-contract
      description: Retrieve a single contract
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: contracts-endpoints-subpackage-contracts.getcontract
      with:
        contract_id: tools.contract_id
        expand: tools.expand
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.