The Media Upload endpoint allows you to manage your Hosted Items, by uploading new Hosted Items, or by requesting information about, or updating, existing Hosted Items.
Endpoint (North America): https://api.eccmp.com/services2/api/MediaUpload
Endpoint (Europe): https://api.ccmp.eu/services2/api/MediaUpload
Endpoint (Japan): https://api.marketingsuite.jp/services2/api/MediaUpload
For more details on the Media Upload API, please see the Media Upload / Hosted Item API Technical Guide.
The Media Upload endpoint supports the following GET operation. This endpoint allows you to retrieve the URL for a specified Hosted Item by providing its Object Reference ID.
Click hereClick here to see a sample response message in JSON format.
"http://namwpm.eccmp.com/wpm/394/LogoImages/Company_logo.png"
The Media Upload endpoint supports the following POST operation. This endpoint allows you to upload a new Hosted Item by providing the following basic information:
Your Customer ID.
The Hosted Item's display name within the application. This name can't contain any spaces or special characters, except for underscores. It also must contain one of the following supported file extensions: .jpeg, .jpg, .gif, .bmp, .png, .htm, html, and .zip.
The Folder ID of the folder where you want to save the new item. Please note that Hosted Items use a different folder structure than the folders where you save other Messaging assets, like Filters or Campaigns. Hosted Items have their own unique folder structure, and their own unique item type. When looking up Hosted Item folders using the Search endpoint, you must use the item type "WebFiles," rather than "Folders." You can also used the Hosted Item endpoint to look up Folder IDs for Hosted Item folders.
The encoding method -- this must be "base64."
The Base64-encoded contents of the file.
Click hereClick here to see a sample request message in JSON format.
{
"cust_id": 394,
"filename": "Company_logo.png",
"parent_obj_id": 37228,
"encoding": "base64",
"data": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAACXBIWXMAAA7EAAAOxAGVKwOLpGMQLA8AAAAAElFTkSuQmCC"
}
Note: The base64-encoded data in the above example has been truncated for the sake of readability.
The Media Upload endpoint supports the following PUT operation. This endpoint allows you to replace an existing Hosted Item with an updated version. The request message must include the Hosted Item's Object Reference ID, and the Base64-encoded data for the new version.
Note: You can't change the Hosted Item's name or location.
Click hereClick here to see a sample request message in JSON format.
{
"item_id": 52271,
"cust_id": 394,
"filename": "Company_logo.png",
"parent_obj_id": 37228,
"encoding": "base64",
"data": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAACXBIWCC"
}
Note: The base64-encoded data in the above example has been truncated for the sake of readability.
Back to API Category - Data Management