Endpoint
POST /api/Account/ChangeSelectAccount
Request
URI Parameters
Name | Type | Additional information |
---|---|---|
AccountId | globally unique identifier | The amount you want to send |
Response
Name | Type | Additional information |
---|---|---|
Status | String | None |
AccountId | globally unique identifier | None |
CompanyName | String | None |
Example Request
public async Task<object> ChangeSelectAccount(string access_token, Guid AccountId)
{
using (var client = new HttpClient())
{
try
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", access_token);
var queryParameters = new Dictionary<string, string>
{
{ "AccountId", AccountId.ToString() },
};
var dictFormUrlEncoded = new FormUrlEncodedContent(queryParameters);
var queryString = await dictFormUrlEncoded.ReadAsStringAsync();
var url = root + "/api/Account/ChangeSelectAccount";
var response = client.PostAsync(url + $"?{queryString}", null).Result;
if (response.IsSuccessStatusCode)
{
string result = await response.Content.ReadAsStringAsync();
JObject jObject = JObject.Parse(result);
return jObject;
}
else return response.StatusCode;
}
catch (Exception e)
{
return "Exception: " + e.Message;
}
}
}
Example Response
{
"Status": "Change selected account successfully",
"AccountId": "a5aec89d-f874-41c8-bc24-afe29bbe8db6",
"CompanyName": "dfdf"
}