Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated dates to ISO format

...

Code Block
languagejs
titleCourse (course)
collapsetrue
var course = {
  "title" : "My New Course",
  "type" : "course",
  "field_course_summary" : {
    "value" : "this is the summary<b>This is bold</b>", // Basic HTML structure is supported
    "format" : "filtered_html"
  },
  "field_course_date" : {
    "value" : date('Y-m-d\TH:i:s', 1471452801), // The course opening date. AIn UnixISO UTCformat
Timestamp     "value2" : date('Y-m-d\TH:i:s', 1471452801), // The course expiration date. AIn UnixISO UTC Timestampformat
  },
  "model" : "SKU_1234",
  "status" : 1,
};

...

Code Block
languagejs
titleCourse Object Fulfillment (course_object_fulfillment)
collapsetrue
var course_object_fulfillment = {
  "coid" : 30, // The course object id. This is different from the course nid.
  "uid" : 1,
  "grade_result" : 100,
  "date_started" : date('Y-m-d\TH:i:s', 1471452801), // UnixIn UTCISO Timestampformat
  "date_completed" : date('Y-m-d\TH:i:s', 1471452801), // UnixIn UTCISO Timestampformat
  "complete" : 1,
};


Code Block
languagejs
titleCourse Report (course_report)
collapsetrue
var course_report = {
  "nid" : 10,
  "uid" : 1,
  "grade_result" : 0,
  "date_completed" : NULL,
  "updated" : date('Y-m-d\TH:i:s', 1471452801), // UnixIn UTCISO Timestampformat
  "complete" : 0,
  "section" : "course_content", // The course object module type
  "section_name" : "Webservice Object",
  "coid" : 30,
};

...

Code Block
languagejs
titleImported Transcript Record (transcript_import)
collapsetrue
var transcript_import = {
  "imported" : 0,
  "nid" : 10,
  "attended" : 0,
  "complete" : 1,
  "external_mail" : "webservice_user@dlcdev.com",
  "date_completed" : date('Y-m-d\TH:i:s', 1471452801), // UnixIn UTCISO Timestampformat
  "start" : date('Y-m-d\TH:i:s', 1471452801), // UnixIn UTCISO Timestampformat
  "credit_type" : "webservice_credit",
  "credits" : 10,
};

...

Code Block
languagejs
titleOrder (uc_order)
collapsetrue
var uc_order = {
  "uid" : 1,
  "customer" : 1, // The user"s uid
  "delivery_address" : {
    "first_name" : "Tom",
    "last_name" : "Baker",
    "company" : "DLC",
    "street1" : "1520 Locust",
    "street2" : "Suite 1000",
    "city" : "Philadelphia",
    "postal_code" : "19102",
    "phone" : "215-321-1234",
    "email" : "webservice_user@dlcdev.com"
  },
  "billing_address" : {
    "first_name" : "WS First",
    "last_name" : "WS Last",
    "company" : "DLC",
    "street1" : "1520 Locust",
    "street2" : "Suite 1000",
    "city" : "Philadelphia",
    "postal_code" : "19102",
    "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" : date('Y-m-d\TH:i:s', 1471452801), // UnixIn UTCISO Timestampformat
  "modified" : date('Y-m-d\TH:i:s',1471452801), // UnixIn UTCISO Timestampformat
  "host" : "127.0.0.1",
};


Code Block
languagejs
titleOrder (uc_order_product)
collapsetrue
var uc_order_product = {
  "order_id" : 60,
  "nid" : 10,
  "title" : "my new course",
  "model" : "course_10",
  "qty" : 1,
  "cost" : 1,
  "price" : 1,
};

...