This document outlines the purpose, technology, methods and objects for using the State API.
This API provides access to basic state information about the current users' session.
The State API endpoint for any site is located at http://[siteurl]/api/state.
This endpoint is enabled for access via HTTP GET.
None
None
| Name | Type | Description |
|---|---|---|
| Currency | string | Currency ID. |
| DisplayState | string | Display State ID. |
| string | Email address of the current user. | |
| ExchangeRate | string | Exchange rate of the current order (in base currency). |
| FirstName | string | Given name of the current user. |
| ItemCount | string | The total number of items in the current order. |
| LoggedIn | string | Defines whether the current user has logged in (true) or not (false) |
| OrderValue | string | Total value of the current order. |
| Surname | string | Surname of the current user. |
| WebsiteID | string | Website ID. |
{
"Currency": "554",
"DisplayState": "1",
"Email": "[email protected]",
"ExchangeRate": "1.000"
"FirstName": "Example",
"ItemCount": "1",
"LoggedIn": "true",
"OrderValue": "17.5000",
"Surname": "Example",
"WebsiteID": "1"
}
<State xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Estaronline.Web.Consumer.State"> <Currency>554</Currency> <DisplayState>1</DisplayState> <Email>[email protected]</Email> <ExchangeRate>1.000</ExchangeRate> <Firstname>Example</Firstname> <ItemCount>1</ItemCount> <LoggedIn>True/<LoggedIn> <OrderValue>17.5000</OrderValue> <Surname>Example</Surname> <WebsiteID>1</WebsiteID> </<State>