{"__v":2,"_id":"56951c85562335190016da7d","category":{"__v":4,"_id":"56951b2dfcb1032d0089df7a","pages":["56951c85562335190016da7d","56951c952e5eb41700901a6a","56951cabfcb1032d0089df7d","56951d07fe18811700c9bf90"],"project":"563cc7119799fb0d00047685","version":"563cc7119799fb0d00047688","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-01-12T15:26:37.496Z","from_sync":false,"order":8,"slug":"sessions","title":"Sessions"},"editedParams":true,"editedParams2":true,"parentDoc":null,"project":"563cc7119799fb0d00047685","user":"563cc6fa8894d20d00014ea3","version":{"__v":16,"_id":"563cc7119799fb0d00047688","project":"563cc7119799fb0d00047685","createdAt":"2015-11-06T15:28:17.683Z","releaseDate":"2015-11-06T15:28:17.683Z","categories":["563cc7129799fb0d00047689","566f37f37ffa002300c3cd5b","56914e9bd47b020d002225ac","5692b19ffe72e00d00e4f0a8","56940bc2d8c04d1700e5adb6","56940bc83e9d080d00f064f0","56951b2dfcb1032d0089df7a","569522aecaa32519009c410c","569523ce562335190016da97","569523fddcaf0d1700cb86bf","56980e4a8560a60d00e2c3c3","569921a41693520d002e1305","5699323b7465970d00650b82","569e6cc4fbee990d0072d927","56a2768a0aefae0d00b7fe66","5862e862b8b7fa23009665b7"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Model T","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-12T15:32:21.065Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"POST /v1/userSessions HTTP/1.1\nHost: api.drivewealth.io\nAccept: application/json\nContent-Type: application/json\nx-mysolomeo-session-key: 02e57c7d-d071-4c63-b491-1194a9939ea5.2016-01-13T22:34:53.101Z\n\n{\n    \"appTypeID\": \"2000\",\n    \"appVersion\": \"0.1\",\n    \"username\": \"bob121212\",\n    \"emailAddress\": \"bob:::at:::burgers.co\",\n    \"ipAddress\": \"1.1.1.1\",\n    \"languageID\": \"en_US\",\n    \"osVersion\": \"iOS 9.1\",\n    \"osType\": \"iOS\",\n    \"scrRes\": \"1920x1080\",\n    \"password\": \"passw0rd\"\n}","language":"http"},{"code":"curl -X POST -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"x-mysolomeo-session-key: 02e57c7d-d071-4c63-b491-1194a9939ea5.2016-01-13T22:34:53.101Z\"\n'{\n    \"appTypeID\": \"28\",\n    \"appVersion\": \"0.1\",\n    \"username\": \"bob121212\",\n    \"emailAddress\": \"bob@burgers.co\",\n    \"ipAddress\": \"1.1.1.1\",\n    \"languageID\": \"en_US\",\n    \"osVersion\": \"iOS 9.1\",\n    \"osType\": \"iOS\",\n    \"scrRes\": \"1920x1080\",\n    \"password\": \"passw0rd\"\n}' 'https://api.drivewealth.io/v1/userSessions'","language":"curl"}]},"method":"post","results":{"codes":[{"name":"","code":"{\n    \"appTypeID\": 2000,\n    \"commissionRate\": 2.99,\n    \"loginState\": 1,\n    \"referralCode\": \"VL7FN4\",\n    \"sessionKey\": \"02e57c7d-d071-4c63-b491-1194a9939ea5.2016-01-20T20:50:48.680Z\",\n    \"userID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5\",\n    \"wlpID\": \"DW\",\n    \"accounts\": [\n        {\n            \"accountID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5.1452548320228\",\n            \"accountNo\": \"DPAJ000003\",\n            \"userID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5\",\n            \"accountType\": 1,\n            \"cash\": 9950.04,\n            \"currencyID\": \"USD\",\n            \"defaultGoalID\": \"64924fd9-8ef6-48ac-ade2-c628cbfbd6b9\",\n            \"freeTradeBalance\": 0,\n            \"goodFaithViolations\": 0,\n            \"ibID\": \"80f9b672-120d-4b73-9cc9-42fb3262c4b9\",\n            \"interestFree\": false,\n            \"margin\": 1,\n            \"nickname\": \"Bob's Practice Account\",\n            \"openedWhen\": \"2016-01-11T21:38:40Z\",\n            \"goals\": [],\n            \"orders\": [],\n            \"patternDayTrades\": 0,\n            \"positions\": [],\n            \"status\": 2,\n            \"tradingType\": \"C\",\n            \"updatedWhen\": \"2016-01-20T08:17:46.770Z\",\n            \"createdWhen\": \"2016-01-11T21:38:40.228Z\",\n            \"bodMoneyMarket\": 9950.04,\n            \"bodEquityValue\": 43.56,\n            \"bodCashAvailForWith\": 9950.04,\n            \"bodCashAvailForTrading\": 9950.04,\n            \"rtCashAvailForTrading\": 9950.04,\n            \"rtCashAvailForWith\": 9950.04,\n            \"accountMgmtType\": 0,\n            \"longOnly\": true\n        },\n        {\n            \"accountID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456\",\n            \"accountNo\": \"DWTE000005\",\n            \"userID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5\",\n            \"accountType\": 2,\n            \"cash\": 22117.56,\n            \"currencyID\": \"USD\",\n            \"defaultGoalID\": \"353c5517-c10f-4505-81d9-c7887b6fe10e\",\n            \"freeTradeBalance\": 0,\n            \"goodFaithViolations\": 0,\n            \"ibID\": \"80f9b672-120d-4b73-9cc9-42fb3262c4b9\",\n            \"interestFree\": false,\n            \"margin\": 1,\n            \"nickname\": \"Bob's Live Account\",\n            \"openedWhen\": \"2016-01-11T21:43:37Z\",\n            \"goals\": [],\n            \"orders\": [],\n            \"patternDayTrades\": 0,\n            \"positions\": [],\n            \"status\": 2,\n            \"tradingType\": \"C\",\n            \"updatedWhen\": \"2016-01-20T19:50:08.320Z\",\n            \"createdWhen\": \"2016-01-11T21:43:37.455Z\",\n            \"bodMoneyMarket\": 22142.36,\n            \"bodEquityValue\": 2738.61,\n            \"bodCashAvailForWith\": 22142.36,\n            \"bodCashAvailForTrading\": 22142.36,\n            \"rtCashAvailForTrading\": 22117.56,\n            \"rtCashAvailForWith\": 22117.56,\n            \"accountMgmtType\": 0,\n            \"longOnly\": true\n        }\n    ],\n    \"instruments\": [],\n    \"guest\": false\n}","language":"json","status":200},{"name":"","code":"{\n    \"code\": 404,\n    \"message\": \"Username and Password do not match.  Please try again.\"\n}","language":"json","status":404}]},"settings":"","auth":"required","params":[{"_id":"5696a8cda857080d0082e8f4","ref":"","in":"body","required":true,"desc":"Username.","default":"belcherbob","type":"string","name":"username"},{"_id":"5696a8cda857080d0082e8f3","ref":"","in":"body","required":true,"desc":"Password.","default":"abcd1234","type":"string","name":"password"},{"_id":"5696a8cda857080d0082e8f2","ref":"","in":"body","required":true,"desc":"Application type. Default to `\"2000\"`.","default":"2000","type":"string","name":"appTypeID"},{"_id":"5696a8cda857080d0082e8f1","ref":"","in":"body","required":true,"desc":"Application version number.","default":"0.1","type":"string","name":"appVersion"},{"_id":"5696a8cda857080d0082e8f0","ref":"","in":"body","required":true,"desc":"Language.<br />**Options**: `\"en_US\"` (Default), `\"zh_CN\"`, `\"es_ES\"`, `\"pt_BR\"` or `\"ja_JP\"`.","default":"en_US","type":"string","name":"languageID"},{"_id":"5696a8cda857080d0082e8ef","ref":"","in":"body","required":true,"desc":"Operating system type.","default":"iOS","type":"string","name":"osType"},{"_id":"5696a8cda857080d0082e8ee","ref":"","in":"body","required":true,"desc":"Operating system version.","default":"iOS 9.1","type":"string","name":"osVersion"},{"_id":"5696a8cda857080d0082e8ed","ref":"","in":"body","required":true,"desc":"Screen resolution.","default":"1920x1080","type":"string","name":"scrRes"},{"_id":"5696a8cda857080d0082e8ec","ref":"","in":"body","required":true,"desc":"IP Address.","default":"1.1.1.1","type":"string","name":"ipAddress"}],"url":"/userSessions"},"isReference":true,"order":2,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response\"\n}\n[/block]\nIf user has more than one account, multiple account objects will be returned. Instruments are grouped (from all accounts) into a single instrument object. Every response has a default set of attributes.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`appTypeID`\",\n    \"1-0\": \"`commissionRate`\",\n    \"2-0\": \"`loginState`\",\n    \"3-0\": \"`referralCode`\",\n    \"4-0\": \"`sessionKey`\",\n    \"5-0\": \"`userID`\",\n    \"6-0\": \"`wlpID`\",\n    \"7-0\": \"`accounts`\",\n    \"8-0\": \"`instruments`\",\n    \"0-1\": \"Application type ID.\",\n    \"1-1\": \"Commission rate.\",\n    \"2-1\": \"User's login state.<br />**Options**: `1` - Logged in.\",\n    \"3-1\": \"Referral code to be used if user is referring a new client.\",\n    \"4-1\": \"Current session key.\",\n    \"5-1\": \"User ID.\",\n    \"6-1\": \"White label partner ID.\",\n    \"7-1\": \"Array of accounts. Replicates data found in [Get Account](doc:accounts_get) (single account information) or [List All Accounts](doc:accounts_list) (lists all account information).\",\n    \"8-1\": \"`instruments:` Array of instruments. A compilation of instruments from resting orders, open positions and watch list.\"\n  },\n  \"cols\": 2,\n  \"rows\": 9\n}\n[/block]","excerpt":"Create a user session by logging in with a valid username and password.","slug":"create-session","type":"endpoint","title":"Create Session"}

postCreate Session

Create a user session by logging in with a valid username and password.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

username:
required
stringbelcherbob
Username.
password:
required
stringabcd1234
Password.
appTypeID:
required
string2000
Application type. Default to `"2000"`.
appVersion:
required
string0.1
Application version number.
languageID:
required
stringen_US
Language.<br />**Options**: `"en_US"` (Default), `"zh_CN"`, `"es_ES"`, `"pt_BR"` or `"ja_JP"`.
osType:
required
stringiOS
Operating system type.
osVersion:
required
stringiOS 9.1
Operating system version.
scrRes:
required
string1920x1080
Screen resolution.
ipAddress:
required
string1.1.1.1
IP Address.

Examples


Result Format


Documentation

[block:api-header] { "type": "basic", "title": "Response" } [/block] If user has more than one account, multiple account objects will be returned. Instruments are grouped (from all accounts) into a single instrument object. Every response has a default set of attributes. [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Description", "0-0": "`appTypeID`", "1-0": "`commissionRate`", "2-0": "`loginState`", "3-0": "`referralCode`", "4-0": "`sessionKey`", "5-0": "`userID`", "6-0": "`wlpID`", "7-0": "`accounts`", "8-0": "`instruments`", "0-1": "Application type ID.", "1-1": "Commission rate.", "2-1": "User's login state.<br />**Options**: `1` - Logged in.", "3-1": "Referral code to be used if user is referring a new client.", "4-1": "Current session key.", "5-1": "User ID.", "6-1": "White label partner ID.", "7-1": "Array of accounts. Replicates data found in [Get Account](doc:accounts_get) (single account information) or [List All Accounts](doc:accounts_list) (lists all account information).", "8-1": "`instruments:` Array of instruments. A compilation of instruments from resting orders, open positions and watch list." }, "cols": 2, "rows": 9 } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}