Looping Block
Overview
The Looping Block endpoint allows you to manage your Looping Blocks, by creating new Looping Blocks, or by requesting information about or updating existing Looping Blocks.
Looping Blocks can also be created from the Looping Blocks screen, or from the New Item screen.
For more details on how to set up a Looping Block API request, please see the Looping Block API Technical Guide.
-
Endpoint (North America): https://api.eccmp.com/services2/api/LoopingBlock
-
Endpoint (Europe): https://api.ccmp.eu/services2/api/LoopingBlock
-
Endpoint (Japan): https://api.marketingsuite.jp/services2/api/LoopingBlock
GET Method
The Looping Block endpoint supports the following GET operation to retrieve information about an existing Looping Block.
Retrieve a Looping Block
This endpoint allows you to retrieve information about a specified Looping Block by providing its Object Reference ID. The response message will include all of the Looping Block's format versions (HTML, Plain Text, etc.), the XSLT code for each format version, and the data source for the Looping Block.
Click here to see a sample response message in JSON format.
POST Method
The Looping Block endpoint supports the following POST operation to create a Looping Block.
Create a Looping Block
This endpoint allows you to create a new Looping Block by providing the following minimum information:
-
Your Customer ID.
-
The Entity ID and the Object Reference ID for the Looping Block's source table.
-
Type ID: For a Looping Block, this value will be "LOOPING_BLOCK."
-
Format Version and Usage Mask: These two parameters used to define the desired format version. You can optionally define multiple format versions in a Looping Block, but you must define at least one.
-
The content of each format version contains the desired XSLT code. If you already have this code, you can provide it in this parameter. If you intend to use the system-generated XLST code, then you can simply provide a valid, generic XSLT document in this parameter, as you'll later use a PUT request to insert the system-generated XLST code into this Looping Block.
-
The hierarchy for the Looping Block's data source. The data source can consist of one or more fields, and those fields can be on the Looping Block's source table, or on a joined table.
-
The name of the new Looping Block.
-
The Folder ID of the folder where you want to save the new Looping Block.
Click here to see a sample request message in JSON format.
PUT Method
The Looping Block endpoint supports the following PUT operation to update an existing Looping Block.
Update a Looping Block
This endpoint allows you to submit modifications to an existing Looping Block. The request message must include the Looping Block's Object Reference ID, and the desired changes. Using this endpoint, you can change the Looping Block name, modify the content of a format version, define a new format version, and delete an existing format version. To delete a format version, simply omit it from the request message; any existing format versions that aren't referenced in the request message will be deleted.
Click here to see a sample request message in JSON format.
DELETE Method
The Looping Block endpoint supports a DELETE operation that will delete the specified Looping Block. You must provide the Object Reference ID for the desired Looping Block.
Note: Deleted Looping Blocks are moved to the Recycle Bin.