Link

Subscribers

A subscriber is identified by a pair of a provider and an identity (such as [email, dev@quintype.com]). A subscriber can have many identities. A provider is an external system. It can be one of [email, quintype, wordpress]. A subscriber is created in AccessType when a user with an identity attempts a subscription. The APIs available are for creation and update of subscriber metadata.



POST Subscriber Metadata

Validates and adds Subscriber metadata.

Arguments
key required
The account key
accesstype_jwt required
Used to identify loggedin user. This is the authorized user jwt
address optional
JSON object containing optional subscriber address keys - line1, line2, city, state, country, pincode. All other keys are filtered out
phone_number optional
Subscriber's phone number.
other optional
JSON object containing other subscriber metadata. Can be any random metadata.
  $ curl -X POST 'https://accesstype.com/api/access/v1/members/me/metadata?key=<key>&accesstype_jwt=<accesstype_jwt>'-d {
  "address": {
      "line1": "221B Bakers Street",
      "line2": "Near Watson Library",
      "city": "London",
      "state": "",
      "country": "Great Britain",
      "pincode": ""
  },
  "phone_number": "007",
  "other": {
    "dummy1": "dummy1-value"
  }
}
Returns

This returns empty body when successful else error message is returned.


PUT Subscriber Metadata

Validates and updates Subscriber metadata.

Arguments
key required
The account key
accesstype_jwt required
Used to identify loggedin user. This is the authorized user jwt
address optional
JSON object containing optional subscriber address keys - line1, line2, city, state, country, pincode. All other keys are filtered out
phone_number optional
Subscriber's phone number.
other optional
JSON object containing other subscriber metadata. Can be any random metadata.
  $ curl -X PUT 'https://accesstype.com/api/access/v1/members/me/metadata?key=<key>&accesstype_jwt=<accesstype_jwt>'-d {
  "address": {
      "line1": "221B Bakers Street",
      "line2": "Near Watson Library",
      "city": "London",
      "state": "",
      "country": "Great Britain",
      "pincode": ""
  },
  "phone_number": "007",
  "other": {
    "dummy1": "dummy1-value"
  }
}
Returns

This returns empty body when successful else error message is returned.


GET subscriber metadata

Return subscriber metadata as json object.

Arguments
key required
The account key
accesstype_jwt optional
Used to identify loggedin user. This is the authorized user jwt
  $ curl -X GET 'https://accesstype.com/api/access/v1/members/me/metadata?key=<key>&accesstype_jwt=<accesstype_jwt>'
Returns

This returns a json object containing subscriber metadata.

{
  "address": {
      "line1": "221B Bakers Street",
      "line2": "Near Watson Library",
      "city": "London",
      "state": "",
      "country": "Great Britain",
      "pincode": ""
  },
  "phone_number": "007",
  "other": {
    "dummy1": "dummy1-value"
  }
}