Use this request to retrieve all market records. These are markets that agents can be assigned to and are managed through Agent Market Setup and stored within the Market table. The ExternalCode returned from a successful request is used as a parameter in the following:
Request Format
http://{server}/api/agents/markets
HTTP Verb/Method:
GET
Request Parameter
The following table describes the parameter available for this request.
Parameter |
Description |
{server} |
Provide the name of the server running the MoversSuite API Service. |
Request Return
Upon a successful call, the request returns market records in JSON format as detailed within the example below.
Upon an error, the request returns an error message and writes an exception to the MssApiService log.
REQUEST EXAMPLE:
http://server/api/agents/markets
SAMPLE SUCCESSFUL RETURN:
[{
"Description": "A Market",
"ExternalCode": "AM1",
"MarketId": 5
},
{
"Description": "Another Market",
"ExternalCode": "AM2",
"MarketId": 6
}]
The following table describes the data returned by this method.
Property |
Description |
Description |
Corresponds to the Description field for an Agent Market Setup record. |
ExternalCode |
Corresponds to the External Code field for an Agent Market Setup record. Use this in other requests to Add Agent Market Request, Delete Agent Market Request, and Delete Market Request. |
MarketId |
This is the unique table identifier within the AgentMarket table. |