Api Function Name

dp_12000_get_user_profile


This will get some details about the user such as:

    • User ID
    • Username
    • Email
    • Role
    • First Name
    • Last Name
    • Gravatar URL
    • List of Store ID’s the user can access

End Point URL

The url end point is: https://api.arcticspascore.com/live/

Parameters

action Type Example Required Description
action varchar dp_12000_get_user_profile yes

Name of the action

wp_user_id int 123 yes

User id of the user

session_token varchar abc123 yes

The session token for the user

Response Codes

Response Code Response Message
12001 wp_user_id was not valid
12002 session_token was not valid
12003 session credentials not valid
12004 unknown issue with getting profile. contact support
12005 here are the profile details

Example Responses

Response Code Response Format Example
12005 json
{
    "MainResponse": {
        "APIName": "Arctic Spas Core Live API",
        "APIFunctionName": "dp_12000_get_user_profile",
        "HttpResponseCode": 200,
        "RequestID": 4953,
        "QueryDateTimeGMT": "2018-04-27 11:40:56",
        "ResponseTime": 0.120820045471,
        "ResponseCode": 12005,
        "ResponseMessage": "here are the profile details"
    },
    "ProfileDetails": {
        "user_id": "15",
        "username": "joebloggs",
        "email": "joe@bloggs.com",
        "role": "dealer",
        "first_name": "Joe",
        "last_name": "Bloggs",
        "avatar": "https://secure.gravatar.com/avatar/9bfd559a1d7d6a883345a4d21b9ae12b?s=96&d=mm&r=g"
    },
    "Stores": [
        "24884",
        "15820"
    ]
}