PRODUCTION

This webservice is used to update the network user suscription. The users information has to be retreived thru the network/query-customers service.

Resource information
AuthenticationRequired
HTTP MethodPOST
ResponseJSON
Version1

Resource URL

https://www.mapapropapp.com/api/action/network-v1/update-suscription

Parameters

KeyTypeRequiredDescription
agencyIdstringyesThe agency ID provided by GET /api/action/feed-v1/get-properties or GET /api/action/feed-v1/get-delta webservices in the Feeds API. some Like ECID001**11267**01EN
planDescriptionstringyesA description of the suscription of the user. Like "Plan Plus 5 Publications". This text is displayed to the customer.
planMaxPublicationsintyesThe name of the portal submiting the question. ie. Trovit
planCoststringyesThe cost of the suscription. This is an arbitrary string so you should send the $ sign included of the currency. This text is displayed to the user.
planBillingCyclestringyesIndicate the billing cycle for the plan like "Weekly", "Monthly". This text is displayed to the user.
planUpgradeURLstringyesThe URL where the user can click and upgrade, cancel or modify his suscription.
listingURLstringyesThe URL of in your network with all the properties of the user. For example http://yoursite.com/nelson-properties
accountStatusstringyesA text indicating the current status of the account. This is useful to show if the user is due for payment , with suspended account or to show the balance.

Sample code

POST /api/action/network-v1/update-suscription HTTP/1.1
Host: www.mapapropapp.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Authorization: Bearer ya29.1.AADtN_UxybTdjLw9j.X96lg_SXIgc3wTtek4q2WvfETzSrz7Q6loEYoJEWd1x4qvlpGw

agencyId=ECID001126701EN&planDescription=PLUS%2010&planMaxPublications=10&planCost=%24%2033&planBillingCycle=SEMANAL
&planUpgradeURL=https%3A%2F%2Fmysite.com%2Fupgrade%3FagencyId%3DAIGIGI
&listingURL=https%3A%2F%2Fmysite.com%2Fjulian-inmobiliaria
&accountStatus=AL%20DIA

Response

The JSON response will tell you if the question was submitted, if not, will tell you what happened showing that is in the queue for moderation because looks like spam or has invalid fields.

ObjectFieldTypeRequiredDescription
ResponsesuccessbooleanyesA boolean showing if the submission was or not successful
errorstringnoA text indicating the type of error if success == false

Sample code

{
    "success": false,
    "error": "AGENCY_NOT_FOUND"
}