Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The following data examples are in PHP format. They may be converted to JSON or XML as a guide to structuring correctly formatted web service calls.

Code Block
languagephp
titleAuthentication Name (authmap)
collapsetrue
$authmap = array(
 'uid' => 1,
 'authname' => 'ethosce_authname',
 'module' => 'ethosce_ext_module',
 );

...

Code Block
languagephp
titleOrder (uc_order)
collapsetrue
$uc_order = array(
      "uid" => 1,
      "customer" => 1, // The user's uid
      "delivery_address" => array(
        "first_name" => "WS FirstTom",
        "last_name" => "WS LastBaker",
        "company" => "DLC",
        "street1" => "1520 Locust",
        "street2" => "Suite 1000",
        "city" => "Philadelphia",
        "zonepostal_code" => "5119102",
// Needed? Auto assigned via postal code? See uc_zones table "phone" => "215-321-1234",
        "postal_codeemail" => "19102",webservice_user@dlcdev.com"
      ),
      "countrybilling_address" => "840", // Needed? See uc_countries table. Also: https://en.wikipedia.org/wiki/ISO_3166-1_numericarray(
        "first_name" => "WS First",
        "phonelast_name" => "215-321-1234WS Last",
        "emailcompany" => "webservice_user@dlcdev.comDLC",
      ),
       "billing_addressstreet1" => array( "1520 Locust",
        "first_namestreet2" => "WSSuite First1000",
        "last_namecity" => "WS LastPhiladelphia",
        "companypostal_code" => "DLC19102",
        "street1phone" => "1520 Locust215-321-1234",
        "street2email" => "Suite 1000",
 webservice_user@dlcdev.com"
      ),
      "cityorder_status" => "Philadelphiacompleted",
      "order_total" => 250.00,
      "zoneprimary_email" => "51webservice_user@dlcdev.com",
// Needed? Auto assigned via postal code? See uc_zones table
 "payment_method" => "",
       "postal_codecreated" => "19102",
  1471452801, // Unix UTC Timestamp
      "countrymodified" => "840"1471452801, // Needed? See uc_countries table. Also: https://en.wikipedia.org/wiki/ISO_3166-1_numeric
        "phone" => "215-321-1234",
        "email" => "webservice_user@dlcdev.com"
      ),
      "order_status" => "completed",
      "order_total" => 250.00,
      "primary_email" => "webservice_user@dlcdev.com",
      "payment_method" => "",
      "created" => 1471452801, // Unix UTC Timestamp
      "modified" => 1471452801, // Unix UTC Timestamp
      "host" => "127.0.0.1",
    );
Code Block
languagephp
titleOrder (uc_order_product)
collapsetrue
$uc_order_product = array(
      'order_id' => 60, // Order id from uc_orders table
      'nid' => 10,
      'title' => 'my new course',
      'model' => 'course_10',
      'qty' => 1,
      'cost' => 1,
      'price' => 1 Unix UTC Timestamp
      "host" => "127.0.0.1",
    );
$profile2 = array(
Code Block
languagephp
titleProfile (profile2Order (uc_order_product)
collapsetrue
$uc_order_product = array(
      'order_id' => 60,
      'nid' => 10,
      'usertitle' => 1 'my new course',
      'labelmodel' => 'Profilecourse_10',
      'typeqty' => 1,
      'profilecost' => 1,
      'field_first_nameprice' => 'John'1,

     'field_middle_name' => 'Middle',);
Code Block
languagephp
titleProfile (profile2)
collapsetrue
$profile2 = array(
      'field_last_nameuser' => 'Smith'1,
      'field_profile_locationlabel' => array(
  'Profile',
      'streettype' => '1520 Locust Streetprofile',
 
      'additionalfield_first_name' => 'Suite 1000Tom',
        'city'field_middle_name' => 'PhilaStewart',
 
      'provincefield_last_name' => 'PABaker',

       'postalfield_profile_codelocation' => '19102',array(
        'countrystreet' => 'us',1520       )Locust Street',
    //    'field_learner_typeadditional' => 'StudentSuite 1000',
    //    'field_booleancity' => 1'Phila',
    //    'field_dateprovince' => (1471452801 - 86400)'PA',
    //    'fieldpostal_checkboxcode' => array('19102',
    //      'undcountry' => array('us',
    //  ),
    // 'optionfield_twoboolean' => 1,
    // 'field_checkbox'       'option_four',=> array(
    //   'und' => array(
   ), //    //  'option_one',
    ),//     );
Code Block
languagephp
titleQuiz Result (quiz_result)
collapsetrue
$quiz_result = array(
    );
Code Block
languagephp
titleQuiz Result Answer (quiz_result_answer)
collapsetrue
$quiz_result_answer = array('option_two',
    //    ),
    //  ),
    );
Code Block
languagephp
titleUser (user)
collapsetrue
$user = array(
      'name' => 'webservice@dlcdev.comwebservice_username', // Username
      'mail' => 'webservice@dlcdev.com',
      'status' => 1,
    );