Components

Link text items to a component

Links one or more existing text items to an existing library component by developer ID, so they share the component's text going forward.

Each linked text item takes on the component's current text, variables, variants, and other fields. Text items already linked to a different component are skipped.

patch/components/link

Request

  • Base URL: https://api.dittowords.com/v2
  • URL: https://api.dittowords.com/v2/components/link
  • Auth: API key in header Authorization

Request body

componentIdstring required

Developer ID of the library component to link text items to.

textItemIdsstring[] required

Developer IDs of the text items to link to this component. Text items already linked to a different component are skipped.

Example request

{
  "componentId": "component-id-1",
  "textItemIds": [
    "text-item-id-1",
    "text-item-id-2"
  ]
}

Response

Returns success status of the link operation, the number of text items actually linked, and the developer IDs of any that were skipped because they're already linked to a different component

successboolean required

Indicates whether the link operation was successful

linkedCountnumber required

The number of text items actually linked to the component.

skippedDeveloperIdsstring[] required

Developer IDs from the request that were skipped because they're already linked to a different component.

Example response

{
  "success": true,
  "linkedCount": 2,
  "skippedDeveloperIds": []
}

Changes

No recorded changes to this operation across all 1 revision of this API.