pem.batchRequest Sample

The following XML snippet shows the structure of sample request for XML-RPC call for this method. It performs an account creation through pem.addAccount method, then add user to the account by pem.addAccountMember and then provides a subscription for the account by pem.activateSubscription method in one XML-RPC request i.e. one Operations transaction.

<?xml version="1.0"?>
<methodCall>
   <methodName>pem.batchRequest</methodName>
   <params>
      <param>
         <value>
            <struct>
               <member>
                  <name>operation</name>
                  <value>
                     <string>pem.addAccount</string>
                  </value>
               </member>
               <member>
                  <name>parameters</name>
                  <value>
                     <array>
                        <data>
                           <value>
                              <struct>
                                 <member>
                                    <name>account_id</name>
                                    <value>
                                       <int>${account_id_here}</int>
                                    </value>
                                 </member>
                                 <member>
                                    <name>account_type</name>
                                    <value>
                                       <string>C</string>
                                    </value>
                                 </member>
                                 <member>
                                    <name>parent_account_id</name>
                                    <value>
                                       <int>1</int>
                                    </value>
                                 </member>
                                 <member>
                                    <name>person</name>
                                    <value>
                                       <struct>
                                          <member>
                                             <name>title</name>
                                             <value>
                                                <string>Mr.</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>first_name</name>
                                             <value>
                                                <string>${first_name_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>middle_name</name>
                                             <value>
                                                <string>${middle_name_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>last_name</name>
                                             <value>
                                                <string>${last_name_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>company_name</name>
                                             <value>
                                                <string>${company_name_here}</string>
                                             </value>
                                          </member>
                                       </struct>
                                    </value>
                                 </member>
                                 <member>
                                    <name>address</name>
                                    <value>
                                       <struct>
                                          <member>
                                             <name>street_name</name>
                                             <value>
                                                <string>${street_name_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>house_num</name>
                                             <value>
                                                <string>${house_num_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>address2</name>
                                             <value>
                                                <string>${second_address_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>zipcode</name>
                                             <value>
                                                <string>${zipcode_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>city</name>
                                             <value>
                                                <string>${city_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>country</name>
                                             <value>
                                                <string>${two_char_code_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>state</name>
                                             <value>
                                                <string>${state_here}</string>
                                             </value>
                                          </member>
                                       </struct>
                                    </value>
                                 </member>
                                 <member>
                                    <name>phone</name>
                                    <value>
                                       <struct>
                                          <member>
                                             <name>country_code</name>
                                             <value>
                                                <string>${country_code_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>area_code</name>
                                             <value>
                                                <string>${area_core_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>phone_num</name>
                                             <value>
                                                <string>${phone_num_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>ext_num</name>
                                             <value>
                                                <string>${ext_num_here}</string>
                                             </value>
                                          </member>
                                       </struct>
                                    </value>
                                 </member>
                                 <member>
                                    <name>fax</name>
                                    <value>
                                       <struct>
                                          <member>
                                             <name>country_code</name>
                                             <value>
                                                <string>${country_code_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>area_code</name>
                                             <value>
                                                <string>${area_code_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>phone_num</name>
                                             <value>
                                                <string>${phone_num_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>ext_num</name>
                                             <value>
                                                <string>${ext_num_here}</string>
                                             </value>
                                          </member>
                                       </struct>
                                    </value>
                                 </member>
                                 <member>
                                    <name>email</name>
                                    <value>
                                       <string>${email_here}</string>
                                    </value>
                                 </member>
                              </struct>
                           </value>
                        </data>
                     </array>
                  </value>
               </member>
            </struct>
         </value>
      </param>
      <param>
         <value>
            <struct>
               <member>
                  <name>operation</name>
                  <value>
                     <string>pem.addAccountMember</string>
                  </value>
               </member>
               <member>
                  <name>parameters</name>
                  <value>
                     <array>
                        <data>
                           <value>
                              <struct>
                                 <member>
                                    <name>account_id</name>
                                    <value>
                                       <int>${account_id_here}</int>
                                    </value>
                                 </member>
                                 <member>
                                    <name>auth</name>
                                    <value>
                                       <struct>
                                          <member>
                                             <name>login</name>
                                             <value>
                                                <string>${account_login_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>password</name>
                                             <value>
                                                <string>${account_passwd_here}</string>
                                             </value>
                                          </member>
                                       </struct>
                                    </value>
                                 </member>
                                 <member>
                                    <name>person</name>
                                    <value>
                                       <struct>
                                          <member>
                                             <name>title</name>
                                             <value>
                                                <string>Mr.</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>first_name</name>
                                             <value>
                                                <string>${first_name_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>middle_name</name>
                                             <value>
                                                <string>${middle_name_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>last_name</name>
                                             <value>
                                                <string>${last_name_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>company_name</name>
                                             <value>
                                                <string>${company_name_here}</string>
                                             </value>
                                          </member>
                                       </struct>
                                    </value>
                                 </member>
                                 <member>
                                    <name>address</name>
                                    <value>
                                       <struct>
                                          <member>
                                             <name>street_name</name>
                                             <value>
                                                <string>${street_name_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>house_num</name>
                                             <value>
                                                <string>${house_num_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>address2</name>
                                             <value>
                                                <string>${second_address_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>zipcode</name>
                                             <value>
                                                <string>${zipcode_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>city</name>
                                             <value>
                                                <string>${city_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>country</name>
                                             <value>
                                                <string>${two_char_code_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>state</name>
                                             <value>
                                                <string>${state_here}</string>
                                             </value>
                                          </member>
                                       </struct>
                                    </value>
                                 </member>
                                 <member>
                                    <name>phone</name>
                                    <value>
                                       <struct>
                                          <member>
                                             <name>country_code</name>
                                             <value>
                                                <string>${country_code_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>area_code</name>
                                             <value>
                                                <string>${area_code_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>phone_num</name>
                                             <value>
                                                <string>${phone_num_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>ext_num</name>
                                             <value>
                                                <string>${ext_num_here}</string>
                                             </value>
                                          </member>
                                       </struct>
                                    </value>
                                 </member>
                                 <member>
                                    <name>fax</name>
                                    <value>
                                       <struct>
                                          <member>
                                             <name>country_code</name>
                                             <value>
                                                <string>${country_code_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>area_code</name>
                                             <value>
                                                <string>${area_code_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>phone_num</name>
                                             <value>
                                                <string>${phone_num_here}</string>
                                             </value>
                                          </member>
                                          <member>
                                             <name>ext_num</name>
                                             <value>
                                                <string>${ext_num_here}</string>
                                             </value>
                                          </member>
                                       </struct>
                                    </value>
                                 </member>
                                 <member>
                                    <name>email</name>
                                    <value>
                                       <string>${email_here}</string>
                                    </value>
                                 </member>
                              </struct>
                           </value>
                        </data>
                     </array>
                  </value>
               </member>
            </struct>
         </value>
      </param>
      <param>
         <value>
            <struct>
               <member>
                  <name>operation</name>
                  <value>
                     <string>pem.activateSubscription</string>
                  </value>
               </member>
               <member>
                  <name>parameters</name>
                  <value>
                     <array>
                        <data>
                           <value>
                              <struct>
                                 <member>
                                    <name>account_id</name>
                                    <value>
                                       <int>${account_id_here}</int>
                                    </value>
                                 </member>
                                 <member>
                                    <name>service_template_id</name>
                                    <value>
                                       <int>${service_template_id_here}</int>
                                    </value>
                                 </member>
                                 <member>
                                    <name>subscription_id</name>
                                    <value>
                                       <int>${subscription_id_here}</int>
                                    </value>
                                 </member>
                                 <member>
                                    <name>parameters</name>
                                    <value>
                                       <array>
                                          <data>
                                             <value>
                                                <struct>
                                                   <member>
                                                      <name>var_name</name>
                                                      <value>
                                                         <string>domain_name</string>
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>var_value</name>
                                                      <value>
                                                         <string>${domain_name_here}</string>
                                                      </value>
                                                   </member>
                                                </struct>
                                             </value>
                                             <value>
                                                <struct>
                                                   <member>
                                                      <name>var_name</name>
                                                      <value>
                                                         <string>domain_id</string>
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>var_value</name>
                                                      <value>
                                                         <string>${domain_id_here}</string>
                                                      </value>
                                                   </member>
                                                </struct>
                                             </value>
                                             <value>
                                                <struct>
                                                   <member>
                                                      <name>var_name</name>
                                                      <value>
                                                         <string>registrar_status</string>
                                                      </value>
                                                   </member>
                                                   <member>
                                                      <name>var_value</name>
                                                      <value>
                                                         <string>${registrar_status_here}</string>
                                                      </value>
                                                   </member>
                                                </struct>
                                             </value>
                                          </data>
                                       </array>
                                    </value>
                                 </member>
                              </struct>
                           </value>
                        </data>
                     </array>
                  </value>
               </member>
            </struct>
         </value>
      </param>
   </params>
</methodCall>