Markets API

From docs
Jump to: navigation, search

Mobile_API »Get Markets

Base URL

https://apimobile.callproof.com

Endpoint

/api/markets

Purpose

Retrieves markets for the authenticated user’s company. The list depends on the user’s role:

  • Managers not limited to a market see all non-deleted company markets
  • Managers limited to a market, and market managers, see only markets assigned to them
  • Results are ordered by market name

HTTP Method

GET

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

None.

Query Parameters

None.

Request Body

None.

cURL Example for Android

 curl --location 'https://apimobile.callproof.com/api/markets' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' 

cURL Example for iOS

 curl --location 'https://apimobile.callproof.com/api/markets' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' 

Successful Response (200)

Returns the markets available to the authenticated user.

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
data array List of market records
uri string Requested resource URI

data[]

Field Type Description
id integer Unique identifier of the market
company_id integer Company that owns the market
name string Market display name
deleted boolean Soft-delete flag (false for active markets returned by this endpoint)

Error Responses

Status Code Meaning
400 Bad Request – markets could not be retrieved
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – An error occurred while retrieving markets (for example, "Error while retrieving the Contact Opportunities").
  • 401 – Authentication failed or the access token is missing/expired.