Project

General

Profile

Actions

Provisioning Management » History » Revision 18

« Previous | Revision 18/26 (diff) | Next »
Eric Vieillevigne, 05/12/2015 05:42 PM


Provisioning Management - prov Method

Provisionning Management allows a thirdParty Application to create, update, delete an account of FamilyWall, Set the member profile right, set member premium type and select/update the services enable for such user.

Search User - provsearch

This method returns the accountId of a Valid user by Identifiers (email, login or MSISDN)

By sending an HTTP request http://devserver/api/prov/search?identifier=test@gmail.com

Parameters:

Name Type Description
email String Email identifier
MSISDN String internationalized 10 digits number
login String login of a valid account

Response:

{
  "a01":{
    "r":{
      "r":"12345" 
    },
    "cn":"provsearch" 
  }
}

The Method response is a Long which represents the AccountId of the account searched.

In case, the method encounter any error, the response is an exception with specific parameters detailed below.

Error:

Error Code Type Value Description
FizApiAccIdentifierInvalidException Ex 21 User does not exist

Create Family - provcreatefamily

This method create a family with no member, set premium type, Set Enable Service (e.g. Calendar, Media management, Location...)

By sending an HTTP request http://devserver/api/prov/createfamily

Parameters:

Name Type Description
FamilyName String Name of the Family
FamilyImage file Binary file of Family image
Premium_Type Long Free(0),Premium(1),Premium_Plus(2)
Calendar_Service Boolean Default true
Location_Service Boolean Default true
Autotracking_Service Boolean Default false
Message_Service Boolean Default true
Photo_Service Boolean Default true
Video_Service Boolean Default true
Audio_Service Boolean Default true
Task_Service Boolean Default true

Response:

{
  "a01":{
    "r":{
      "r":"12345" 
    },
    "cn":"provcreatefamily" 
  }
}

The Method response is a Long which represents the FamilyId of the familycreated.

In case, the method encounter any error, the response is an exception with specific parameters detailed below.

Error:

Error Code Type Value Description
AFizApiUnattendedException Ex 21 Unknown exception

Update Family - provupdatefamily

This method update a family, set premium type, Set Enable Service (e.g. Calendar, Media management, Location...)

By sending an HTTP request http://devserver/api/prov/updatefamily?familyId=12345

Parameters:

Name Type Description
FamilyName String Name of the Family
familyId Long Family Id
FamilyImage file Binary file of Family image
Premium_Type Long Free(0),Premium(1),Premium_Plus(2)
Calendar_Service Boolean Default true
Location_Service Boolean Default true
Autotracking_Service Boolean Default false
Message_Service Boolean Default true
Photo_Service Boolean Default true
Video_Service Boolean Default true
Audio_Service Boolean Default true
Task_Service Boolean Default true

Response:

{
  "a01":{
    "r":{
      "r":"12345" 
    },
    "cn":"provupdatefamily" 
  }
}

The Method response is a Long which represents the FamilyId of the family updated.

In case, the method encounter any error, the response is an exception with specific parameters detailed below.

Error:

Error Code Type Value Description
AFizFamilyIdDoesNotExist Ex 11 Family Id Does not Exists

Delete Family - provdeletefamily

This method remove a family with non members

By sending an HTTP request http://devserver/api/prov/deletefamily?familyId=12345

Parameters:

Name Type Description
familyId Long Family Id

Response:

{
  "a01":{
    "r":{
      "r":"true" 
    },
    "cn":"provupdatefamily" 
  }
}

The Method response is true when the operation is successful.

In case the method encounter any error, the response is an exception with specific parameters detailed below.

Error:

Error Code Type Value Description
AFizFamilyIdDoesNotExist Ex 11 Family Id Does not Exists
AFizFamilyNotEmpty Ex 31 Family contains members

Create Account - provcreateaccount

This method create a member for a family and set the member type (member=(0),adminsitrator=(1),founder=(2)). Note that after this method, the user receive an invitation email or an SMS with link to complete the account creation.

By sending an HTTP request http://devserver/api/prov/createaccount?type=Email&identifier=test@gmail.com&countryCode=FR
&accountType=2&locale=FR&familyId=12345&UserName=myFirstName&Locale=fr

Parameters:

Name Type Description
familyId Long Family Id where the member shall be added
Type String Email,phone,login
Identifier String User Identifier Email or MSISDN depending on the type
UserName String User First Name
UserCountryCode String Country Code International Two letters
AccountType Long Account Type (member=(0),administrator=(1),founder=(2))
Locale String Country Code International Two letters

Response:

{
  "a01":{
    "r":{
      "r":"123455" 
    },
    "cn":"provcreateaccount" 
  }
}

The Method response is a Long which represents the AccountId of the account created.

In case, the method encounter any error, the response is an exception with specific parameters detailed below.

Error:

Error Code Type Value Description
AFizFamilyIdDoesNotExist Ex 11 Family Id Does not Exists
FizAccountAlreadyExistsException Ex 2 Account Identifier already exists
FizFounderAlreadyExistsException Ex 15 Founder already exists
AFizInvalidIdentifierException Ex 21 Identifier has an invalid format
AFizInvalidEmailException Ex 17 Email has an invalid format
AFizInvalidMSISDNException Ex 22 MSISDN has an invalid format

Update Account - provupdateaccount

This method update a member for a family and set the member type (member=(0),administrator=(1),founder=(2)).

By sending an HTTP request http://devserver/api/prov/updateaccount?UserCountryCode=FR
&AccountType=2&locale=FR&UserName=myNewFirstName&Locale=fr&accountId=123455

Parameters:

Name Type Description
accountId Long Account Id of the modified account
UserName String User First Name
UserCountryCode String Country Code International Two letters
AccountType Long Account Type (member=(0),adminitrator=(1),founder=(3))
Locale String Country Code International Two letters

Response:

{
  "a01":{
    "r":{
      "r":"123455" 
    },
    "cn":"provupdateaccount" 
  }
}

The Method response is a Long which represents the AccountId of the account updated.

In case, the method encounter any error, the response is an exception with specific parameters detailed below.

Error:

Error Code Type Value Description
AFizFamilyIdDoesNotExist Ex 11 Family Id Does not Exists
FizAccountAlreadyExistsException Ex 2 Account Identifier already exists
FizFounderAlreadyExistsException Ex 15 Founder already exists
AFizInvalidIdentifierException Ex 21 Identifier has an invalid format
AFizInvalidEmailException Ex 17 Email has an invalid format
AFizInvalidMSISDNException Ex 22 MSISDN has an invalid format

Add Account to family- provaddaccount2family

This method add an existing account to a family and set the member type (member=(0),administrator=(1),founder=(2)).

By sending an HTTP request http://devserver/api/prov/addaccount2family?accountId=123455&familyId=333445

Parameters:

Name Type Description
accountId Long Family Id where the member shall added
familyId Long Family Id where the member shall be added

Response:

{
  "a01":{
    "r":{
      "r":"true" 
    },
    "cn":"provupdateaccount" 
  }
}

The Method response is true when the operation is successful.

In case the method encounter any error, the response is an exception with specific parameters detailed below.

Error:

Error Code Type Value Description
AFizFamilyIdDoesNotExist Ex 11 Family Id Does not Exists
FizFounderAlreadyExistsException Ex 15 Founder already exists

Remove Account from family- provremoveaccount2family

This method remove an existing account from a family.

By sending an HTTP request http://devserver/api/prov/removeaccount2family?accountId=123455&familyId=333445

Parameters:

Name Type Description
accountId Long Family Id where the member shall added
familyId Long Family Id where the member shall be added

Response:

{
  "a01":{
    "r":{
      "r":"true" 
    },
    "cn":"provupdateaccount" 
  }
}

The Method response is true when the operation is successful.

In case the method encounter any error, the response is an exception with specific parameters detailed below.

Error:

Error Code Type Value Description
AFizFamilyIdDoesNotExist Ex 11 Family Id Does not Exists
FizFounderAlreadyExistsException Ex 15 Founder already exists

Delete Account provdeleteaccount

This method delete an existing account. It will be removed from all his families beforehand.

By sending an HTTP request http://devserver/api/prov/deleteaccount?accountId=123455

Parameters:

Name Type Description
accountId Long Family Id where the member shall added

Response:

{
  "a01":{
    "r":{
      "r":"true" 
    },
    "cn":"provupdateaccount" 
  }
}

The Method response is true when the operation is successful.

In case the method encounter any error, the response is an exception with specific parameters detailed below.

Error:

Error Code Type Value Description
AFizFamilyIdDoesNotExist Ex 11 Family Id Does not Exists
FizAccountDoesNotExistException Un 507 Account is not found

get Account information provgetaccount

This method returns the information about an existing account, mainly the family he has subscribed to.

By sending an HTTP request http://devserver/api/prov/getaccount?accountId=123455

Parameters:

Name Type Description
accountId Long Family Id where the member shall added

Response:

{
  "a01": "a00": {
    "r": {
      "r": {
        "accountId": "123455",
        "identifiers": [
          {
            "validated": "true",
            "id": "41602",
            "type": "Email",
            "value": "dbfw1@gmail.com" 
          }
        ],
        "name": "Eric Vieillevigne",
        "lastLoginDate": "2015-05-12T17:24:08.782Z",
        "families" : [
            {
                "familyName": "myfamily",
                "pictureURIs": [
                    "http://dev.familywall.com/media/33182_24g29rc4x_37304?" 
                ],
                "premiumType": "2",
                "Calendar_Service": "true",
                "Location_Service": "false",
                "Autotracking_Service": "false",
                "Message_Service": "true",
                "Photo_Service": "true",
                "Video_Service": "true",
                "Audio_Service": "true",
                "Task_Service": "true",
                "metaId": "family/33202",
                "familyId": "33202" 
            },
            {
                "familyName": "myfamily2",
                "pictureURIs": [
                    "http://dev.familywall.com/media/33183_24g29rc4x_37312?" 
                ],
                "premiumType": "2",
                "Calendar_Service": "true",
                "Location_Service": "false",
                "Autotracking_Service": "false",
                "Message_Service": "true",
                "Photo_Service": "true",
                "Video_Service": "true",
                "Audio_Service": "true",
                "Task_Service": "true",
                "metaId": "family/33202",
                "familyId": "33203" 
            }            
        ]
      }
    },
    "cn": "accgetloggedaccount" 
  }

The Method response is true when the operation is successful.

In case the method encounter any error, the response is an exception with specific parameters detailed below.

Error:

Error Code Type Value Description
AFizFamilyIdDoesNotExist Ex 11 Family Id Does not Exists
FizAccountDoesNotExistException Un 507 Account is not found

Updated by Eric Vieillevigne over 10 years ago · 18 revisions