"action" : "getMarkets",
"mode" : "worker"

Manoexperta allows market differentiation. We separate markets by geopolitical divisions of COUNTRY,STATE. These divisions actually become the market handle or channel name in which all requests and opportunities are broadcasted through socket connections. Only users subscribed to that channel will receive messages about this market and this market will have its own set of operational conditions.

It is fundamental that prior to any login you identify which market the user belongs to. An ideal experience will try to obtain user location with geolocation from the device and select the closest available market.

Not all markets are available and not all markets are listed. Manoexperta has an API service that returns "addressable" markets but inside this list there are markets that haven't been licensed yet and are not available for operations. In brief, for 2021, Spanish speaking markets are listed, but only Mexico is valid with its 32 state divisions which are operational, the rest will open as demand rises.

Our general /v21 endpoint will return an array with all market options:

mktHandlethe unique channel identifier. It uses Country,State ISO standardMX,CMX
mktNameUser friendly display name. Displayed as Country,State for groupingMéxico,Ciudad de México
mktLatLngCenter Latitude and Longitude Coordinates for Location. Helps identify closest market to user. 19.3911668,-99.4238168
isValidBoolean. If Market has been licensed and operational then True, else it will be displayed to log demand*true

*Note:  If user selects an invalid market for login, an error will occur. We recommend you redirect user to https://manoexperta.com/socios.cfm to invite them to license and operate the given market when isValid=false

Remember that as with all other APIS, in case of a controlled error, the response will include an error structure with key fields to help troubleshoot. Fields are: error.code, error.msg and error.log. It is advisable to always throw error.msg to the end user in a friendly alert. In such cases there will be no data structure with result.

You will get specific error exceptions (errorcode) from getMarkets API in the following cases:

EMPTYWhen there is no valid available market

Market Setup Variables

Additional, this service will include in its structure, information that will allow you to setup the behaviour of the app for each differentiated market. This information is passed at this stage because we don't necesarrily know who the user is  since there is no token at start, so the variables presented here allow you to render the app accordingly. You will see most vars are simple boolean values to either enable or disable features.

VariableDescriptionExpected Behaviour

Bool. The market support for worker defined packages
If false, workers are not allowed to register ready-made packages and clients are not allowed to post requests for existing packages. Buttons should not appear.
Bool. The market support for credit card payments from clients to expertsIf false, clients should not see the option for any payment related method or view such as Pay Worker or Payment Summary. 
Bool. The market support an additional registration view where users share/input referral code. Currently Not implemented, future marketing placeholder (newUser will update)If true, an additional registration screen should appear after registration (but before data submission) to capture this referral value from new user.
Bool. The market support for inquires. Inquiries are requests for information, not a formal job assignment, only an open chat to get bidsIf false, clients should not see the option button to create a new Inquiry request, also, the option for both clients/workers must not be visible in sidemenu.
Bool. The market support for worker select. This is when clients select from a list of experts the one they wish to hire (instead of auto-apply/assign)If false, clients should not see the option button to view nor to post eligible workers.
String. It's a helper tool with prepopulated values that correspond to the country/state phone dial prefixThis is simply the country/state prefix that should be displayed to capture mobile number for registration

Please note that if you are migrating from a previous version there are some important changes. 1) Some fields such as categories,banklist and similar have been removed as they can be obtained from other apis at other moments, 2) Some prefixes such as XP_xxx have been removed to make information transfer leaner. This is a big catalog.