Query a Specific Customer

Query the detailed information of a specific customer.

Request URL

GET {base_url}/dm/open_api/v1/customers/{customerId}

Request parameters

Path parameter
Parameter Required Type Description
customerId Yes long The ID of the customer.
Note: You can query the customer ID using Query all the Customers or Query the Customer(s) of a Cloud PBX.
Headers
Parameter Required Type Description
Authorization Yes String Pass the access token in the header.

Format: Bearer {access_token}.

Response parameters

Parameter Type Description
data Object <Details> The detailed information.
requestId String The unique ID of the request, which can be used to quickly locate the request.
status String Request result:
  • Success
  • Failed
time Long The response time.
Note: The YCM API response returns a timestamp, you can convert the timestamp to detailed date and time as needed. For more information, see Convert Timestamp to Local Date and Time.
Details
Parameter Type Description
customerId Long The ID of the customer.
firstName String First name.
lastName String Last name.
company String Company name.
email String Email address.
businessNumber String Business number.
mobileNumber String Mobile number.
homeNumber String Home number.
faxNumber String Fax number.
zipCode String ZIP code.
street String Street.
city String City.
state String State.
country String Country.
remark String Remark.

Example

Query the information of a customer (ID: 50086120).

Request example

GET /dm/open_api/v1/customers/50086120 HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NjY0NSwidmVyc2lvbiI6MTY2Mzc0MTEyNSwicmVmcmVzaFZlcnNpb24iOjE2NjQyNDg4ODV9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjY0MjUwNjg1LCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiJiZmQ5MjU3MC00NTA0LTQ4YzYtOWM0NS00OTNjZThkYTUwOTYiLCJjbGllbnRfaWQiOiJ5QXN4ZzdITkRFczNxSHprQk1aUU5Pblo2NTBPRUNNWSJ9.CqUd1N3O2tng0fFCUZPouJl5VeGRYSPTA7pw7ISbRT8
Response example
HTTP/1.1 200 OK
{
  "data": {
        "customerId": 50086120,
        "firstName": "Leo",
        "lastName": "Ball",
        "company": "Example company",
        "email": "leo@example.com"
        "businessNumber": "123123123",
        "mobileNumber": "1234567890",
        "homeNumber": "123123123",
        "faxNumber": "1234567890",
        "zipCode": "249000",
        "street": "10F Jervois Road",
        "city": "Singapore",
        "state": " ",
        "country": "Singapore",
        "remark": "fake-info"
  },
  "requestId": "b996f86a9d83c8383583883955f60b17",
  "status": "Success",
  "time": 1664250039
}