- Subscriptions

Every RETS.CI Subscription is tied to specific Blog (Site). Site can be defined by retsci_secret_token field.

  • ES cluster: config.rets.ci
  • ES path: https://config.rets.ci:dnqpgakfyqdbbyxr@api.wpcloud.io:19100/
  • ES index/type: subscription/subscription

Note: Subscription of site (blog) belongs to the ONLY provider. It means, that if user wants to add to their site another RETS Provider, - the separate Subscription should be created.

Object

Example is also available here

_id:{stripe_account}

{

  // Stripe Information
  "stripe_account": "sfvrg97e33345344df",
  "stripe_subscription_plan": "slug_of_plan",

  // We can determine Site above by the following secret token
  "retsci_secret_token": "4422ba1f1cc899fba0904e5e37573cfe",
  // Blog ID always equals 1 for non-multisite
  "blog_id": 1,
  // MD5 Hash of rets_url
  "provider": "53f046133acc697e33b7ca9b085bec12",

  // When document was created
  "created": "2017-01-10T14:38:00",
  // When document was update last time
  "modified": "2017-01-11T11:25:04",

  // Blog's home page
  "blog_url": "http://demo.rets.ci/houses",

  // WordPress User's Profile data
  // It's current user who added subscription (RETS Credentials)
  "user": {
    "username": "maxim",
    "first_name": "Maxim",
    "last_name": "Peshkov",
    "contact": {
       "email": "maxim@udx.io",
       "website": "http://example.com",
       "aim": "",
       "yahoo": "",
       "jabber": "",
       "google": "",
       "twitter": "",
       "facebook": ""
    }
  },

  // RETS Client on sending request should determine
  // all active plugins and themes
  // It's required to define attributes mapping for current subscription
  "target_products": {
    "plugins": [
      {
        "name": "WP-Property",
        "slug": "wp-property",
        "version": "2.2.0.1"
      },
      {
        "name": "Akismet",
        "slug": "akismet",
        "version": "3.0.0"
      }
    ],
    "theme": {
      "name": "Madison",
      "slug": "madison",
      "version": "2.0.0"
    }
  },

  // RETS Credentials
  // Required.
  "rets_url": "http://matrixrets.hicentralmls.com/rets/login.ashx",
  // Required.
  "rets_username": "",
  // Required.
  "rets_password": "",
  // Optional. Depends on Provider
  "rets_agent_password": "",
  // Optional. Depends on Provider
  "rets_version": "",

  // The ONLY following data is being set manually via RETS.CI manager:

  // The list of all schedules set for current Client's RETS Provider
  "schedules": [

    {
      // Unique ID of schedule
      "schedule_id": "12345",
      // 
      "rets_resource": "Property",
      // 
      "rets_class": "RESI",
      // How many last days we should sync on running Poller at first time
      "sync_days": 15,
      // The limited list of conditions below for a property 
      // which are being set manually. We are pushing property to WordPress site 
      // ONLY if it passes provided conditions.
      "query": {
        "status": "active",
        "type": "residential",
        "officeMLS": "12345",
        "city": "New-York"
      }   
    }

  ]

}

Feedback and Knowledge Base