How to pass required arguments to a custom content type with services? I am trying to create a Room Reservations Reservation through a Service using the Node Creation resource, but looking at the Room Reservations module code, the module does not allow the creation of nodes, or the passing of the form data for that matters, unless specific parameters are passed as arguments in the URL.

So far I have tried using the node create resource with the following data formatted as JSON, to no success

{"title":"fulano de tal","type":"room_reservations_reservation","reservation_block_title":{"und":[{"value":"0"}]},"reservation_date":{"und":[{"value":{"year":"2016","month":"6","day":"1","hour":"10","minute":"0","second":"0"},"timezone":"America/Bogota","timezone_db":"America/Bogota"}]},"reservation_length":{"und":[{"value":"60"}]},"reservation_repeat_type":{"und":[{"value":"1"}]},"reservation_repeat_until":{"und":[{"value":{"year":"2016","month":"6","day":"1","hour":"10","minute":"0","second":"0"},"timezone":"America/Bogota","timezone_db":"America/Bogota"}]},"reservation_room":{"und":[{"value":"163"}]},"reservation_time":{"und":[{"value":"1000"}]},"reservation_series_id":"","field_codigo_reservation":{"und":[{"value":"654535184561"}]},"field_email_registro":{"und":[{"email":"dshaooner@unisabana.edu.co"}]}}


The response is the whole webpage and no node is created.

i think the solution here is to pass the required arguments so that Room Reservations creates the node, would something like the following work?

example.com/endpoint/node.json/add/room-reservations-reservation/6/1/1200/160

Along with the rest of the data in the JSON POST request.
1) Firstly you will create your custom resource for POST request.
Add Below Code to your module file.

function Your_Module_Name_services_resources() {
     $resources = array();
     //$_SERVER['REQUEST_METHOD'] = 'POST';
     //Include the necessary inc files.
    module_load_include('inc', 'Your_Module_Name', 'includes/Your_Module_Name.services');

   //Service Apis for contents.
    $resources += Your_Module_Name_resource();
    return $resources;
}


2) Create Your_Module_Name.services.inc file and write below code for your custom callback as given below.

function Your_Module_Name_resource() {
  $api = array(
'applicant_validate' =&gt; array( // Resource Name
 'operations' =&gt; array(
    'create' =&gt; array(
    'help' =&gt; 'Validate Applicant',
    'file' =&gt; array(
        'type' =&gt; 'inc',
        'module' =&gt; 'your_module_name',
        'name' =&gt; 'includes/your_module_name.services',
    ),
    'callback' =&gt; 'your_callback_function_name',
    'access callback' =&gt; 'user_access',
    'access arguments' =&gt; array('access content'),
    'access arguments append' =&gt; FALSE,
    'args' =&gt; array(
        array(
        'name' =&gt; 'body',
        'type' =&gt; 'string',
        'description' =&gt; 'Function to perform',
        'source' =&gt; 'data',
        'optional' =&gt; FALSE,
        'default' =&gt; '0',
        ),
    ),
    ),
    ),
  ));
   return $api;
 }


// variable name $body as you mentioned above in args part with name      parameter

function your_callback_function_name($body) 
{
  // It's called when you will hit to your web service url from your from submission.

}    

&lt;h2&gt;Validate Web Service&lt;/h2&gt;
 &lt;form id="frm" method="post" action="http://example.com/api/endpoint/applicant_validate"&gt;
 &lt;input type="text" placeholder="Application Id" name="appno" id="appno"/&gt;  
 &lt;input type="text" placeholder="Email Id" name="emailid" id="emailid"/&gt;
&lt;input type="text" placeholder="Mobile Number" name="mobno" id="mobno"/&gt;
&lt;input type="text" name="userpwd" placeholder="Password" id="userpwd"/&gt;
&lt;input  type="submit" value="submit"/&gt;&lt;br/&gt;
&lt;/form&gt;