Manage Data in Data Extensions

This page contains information about managing data in data extensions via the SOAP API.

Why Manage Data in Data Extensions

Using the SOAP API to manage data in data extensions allows you to use data extensions in your interactions with Marketing Cloud while maintaining a tight integration with your system or development environment. Data contained within data extensions can be used to better target or exclude individual subscribers from mailing lists or store more data about subscribers for later use.

How to Manage Data in Data Extensions

Use the sample code below as a model to construct your own API calls.

Create

Sample PHP Code

SOAP Request

Retrieve

Sample .NET Code

Response

Update

The sample code below demonstrates how to update values in a data extension. The data extension must have at least one primary column.

Sample .NET Code

The code below updates the name column using the PhoneNumber field (PhoneNumber is the primary key).

Sample Java Code (Axis 1.4)

PHP

SOAP Request

Delete

As long as the data extension has a primary key, you can use the code below to delete the row. The code below represents a data extension with one primary key. If multiple primary keys exist, those fields would need to be specified.

Upsert

This function updates existing information and inserts new information as necessary.

SOAP Request

SOAP Response

Add Data

Sample PHP Code

SOAP Request

Data Extensions