Create Link Table

Use this endpoint to create a new link table object within an existing folder.

The link table name is specified in the request URI. In the request body, you can specify a description for the new link table. Use the Merge Link Table Records to merge link records into the new link table.

Note: The Responsys Advanced API is generally available for all Responsys customers.

Service URL:

/rest/api/v1.3/folders/{folderName}/linkTables/{linkTableName}

Required Path Parameters:

folderName – The name of the folder in Responsys where you want to create the link table.

linkTableName – The link table name to be created.

Request Method:

POST

Request Header:

Authorization=<AUTH_TOKEN>

Content-Type=application/json

Request Body - Required Properties:

description – A description of the link table.

Sample Request Body

{
  "description": "New Link Table"
}

Sample Response Body - Success

{
  "message": "Link Table has been created",
  "status": true,
  "links": [
    {
      "rel": "self",
      "href": "/rest/api/v1.3/folders/Folder_Name/linkTables/New_Link_Table",
      "method": "POST"
    },
    {
      "rel": "deleteLinkTable",
      "href": "/rest/api/v1.3/folders/Folder_Name/linkTables/New_Link_Table",
      "method": "DELETE"
    },
    {
      "rel": "mergeLinkRecords",
      "href": "/rest/api/v1.3/folders/Folder_Name/linkTables/New_Link_Table/members",
      "method": "POST"
    },
    {
      "rel": "deleteLinkRecords",
      "href": "/rest/api/v1.3/folders/Folder_Name/linkTables/New_Link_Table/members",
      "method": "DELETE"
    }
  ]
}

Sample Response Body - Failure

400 Bad Request

Link table already exists with the same name: Requests fail if a link table with the supplied name already exists. The error resembles:

{
  "type": "",
  "title": "Table already exists",
  "errorCode": "TABLE_ALREADY_EXISTS",
  "detail": "Link Table Already exists with the same name",
  "errorDetails": []
}

Link table name is not valid: Requests fail if the link table name contains an unsupported character. Supported characters are: A-Z a-z 0-9 space ! - = @ _ [ ] { }:

{
  "type": "",
  "title": "Invalid link table name",
  "errorCode": "INVALID_TABLE_NAME",
  "detail": "The link table name is not valid",
  "errorDetails": []
}

Request payload is invalid: Requests fail if the request payload is missing or invalid. The error resembles:

{
  "type": "",
  "title": "Invalid request parameters",
  "errorCode": "INVALID_PARAMETER",
  "detail": "Request payload is invalid",
  "errorDetails": []
}

The length of the link table description is invalid. Maximum allowed length is 1000: Requests will fail if the description is longer than 1000 characters. The error response will resemble the following:

{
  "type": "",
  "title": "Invalid description",
  "errorCode": "INVALID_DESCRIPTION",
  "detail": "The length of the link table description is invalid. Maximum allowed length is 1000",
  "errorDetails": []
}

The length of the link table name is invalid. Maximum allowed length is 100: Requests will fail if the linkTableName is longer than 100 characters. The error response will resemble the following:

{
  "type": "",
  "title": "Invalid link table name",
  "errorCode": "INVALID_TABLE_NAME",
  "detail": "The length of the link table name is invalid. Maximum allowed length is 100",
  "errorDetails": []
}

404 Not Found

The folder name is not found: If the folder name is missing or invalid the error will resemble the following:

{
  "type": "",
  "title": "Folder not found",
  "errorCode": "FOLDER_NOT_FOUND",
  "detail": "The Folder name is not found",
  "errorDetails": []
}

The folder name or link table name is not included in the Request URL: If the folder name or link table name is not included in the request URL, a 404 Not Found error will appear.