Request Settings
URI:
https://api.doculicious.com/entries/7b12cd4d960e33c4.xml
Header:
authorization:DCS 7cd6a6d29b5dae36
Method:
POST
Representation
The format returned data should be in. Eg: xml, json.
Elements Rows Custom1
Rows of element data to return for the created entry .
Custom1 value to be stored against this entry.
Elements Page Custom2
Page of element data to return for the created entry.
Custom2 value to be stored against this entry.
Body Data
  • This is an example of the data that can be passed to this resource.
  • Only the "id" and "value" fields are required, the "name" field is included for clarity.
  • A string in the "value" field will work, as will an object element (As shown by the last element named "img-yourimage".
  • A values "class" attribute is optional, but if not included, the value should be a plain string and not an object.
  • Elements with ID's not found in template will be ignored.
  • Change the values of the fields to see what happens...
  • Make sure you choose the correct content type for the data
  • Some example Image IDs you can use for the last image element "img-yourimage": 5ef6cef745f6506d, 379827129f09563e, 4dfc2c9262844f24, 366e72e5793ce8b3, 0c546b115b3cea50
Content Type: XML JSON Load default data: XML   JSON
Response
Status Code:
 
Content Type:
 
PHP Code Example
// create a new cURL resource  
$ch = curl_init();
 
// set the required resource URL  
curl_setopt($ch, CURLOPT_URL, "https://api.doculicious.com/entries/7b12cd4d960e33c4.xml");
 
// set the authorization header using just the API Access ID. 
// (This is permitted as we have disabled the 'Secure "create new entry" resource' option in this templates API settings.)
curl_setopt($ch, CURLOPT_HTTPHEADER, array("authorization:DCS 7cd6a6d29b5dae36", "Content-Type:application/xml"));
 
// set to true to return the result as a string  
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
 
// Send the data through using a POST   
curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlORjson);
 
//SSL Settings   
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
 
// Execute the request and store the response for later use 
$output = curl_exec($ch);
 
// close cURL resource, and free up system resources 
curl_close($ch);
 
Java Code Example
// The packages needed for this code  
import java.io.InputStream;
import java.net.URL;
import java.net.HttpURLConnection;
import org.apache.commons.io.IOUtils;
 
// set the required resource URL  
URL url = new URL("https://api.doculicious.com/entries/7b12cd4d960e33c4.xml");
 
// Open a connection to the URL 
HttpURLConnection conn = (HttpURLConnection)url.openConnection(); 
 
// set the connection to send data 
conn.setDoOutput(true); 
 
// set the connection to use the POST method 
conn.setRequestMethod("POST"); 
 
// set the correct content type 
conn.setRequestProperty("content-type", "application/xml");
 
// set the authorization header using just the API Access ID. 
// (This is permitted as we have disabled the 'Secure "create new entry" resource' option in this templates API settings.)
conn.setRequestProperty("authorization", "7cd6a6d29b5dae36");
 
// This is the XML or JSON string you got from somewhere  
String body = "..."; 
 
// Write the body to the connections outputstream to post it 
OutputStream out = conn.getOutputStream(); 
PrintWriter pw = new PrintWriter(out); 
pw.print(body); 
pw.flush(); 
pw.close(); 
 
// Use IOUtils to read the resultin inputstream into a String. 
String output = IOUtils.toString(conn.getInputStream(), "UTF-8");