22. WebStore

Interface

This is usefull for automatic settings of WebStore interface. You must indicate the parameter "WebContext". Each [tenant and ogranization] must have one and only one set of settings for each "WebContext".

Actions can be done:

  • list - will return the configuration settings done on the "Web Store" window from SocrateCloud. One domain can be set only to one tenant and organization!

  • insert - this is not a public method. Can be used after authentication process.

  • update - only fields from JSON (get in update method)

  • get background

  • get logo

  • get carousel1

  • get carousel2

  • get carousel3

  • get carousel4

  • get carousel5

  • get product image default

  • get video mp4

  • get video ogg

  • get video mov

  • set background

  • set logo

  • set carousel1

  • set carousel2

  • set carousel3

  • set carousel4

  • set carousel5

  • set product image default

API Methods:

List:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/list/{version}?WebContext=api.socratecloud.com

Method: GET

Return: JSON object with next format:

{

"data": [

{

"Organization": "Demo SRL",

"Tenant": "Demo",

"Created": "2014-12-16 09:09:59+0200",

"CreatedBy": "Demo_Admin",

"Updated": "2014-12-16 10:38:02+0200",

"UpdatedBy": "Demo_Admin",

"Active": true,

"Name": "Test",

"Description": null,

"Comment": null,

"URL": "http://www.test.com",

"WebContext": "web-context",

"ProductWithoutPicture": false,

"RestrictivedRole": "AdminRole",

"Representative": "Demo Admin",

"Warehouse": "Warehouse 10",

"PriceList": "RON VNZ",

"PaymentTerm": "Pe loc",

"OrderType": "Customer RMA",

"WebStoreInfo": "Web Store Info",

"WebStoreEmail": "Web Store Email",

"WebOrderEmail": "Web Order Email",

"WebRequestEmail": "Web Request Email",

"InfoEmail": "Info Email",

"WebStoreUser": "admin",

"WebStorePassword": null,

"EmailHeader": "Header",

"EmailFooter": "Footer",

"MenuOrders": true,

"MenuShipments": true,

"MenuInvoices": true,

"MenuAssets": true,

"MenuPayments": true,

"MenuRfQs": true,

"MenuRequests": true,

"MenuRegistrations": true,

"MenuInterests": true,

"MenuContact": true,

"ChangeReleaseReports": true,

"WebParam1": "1",

"WebParam2": "2",

"WebParam3": "3",

"WebParam4": "4",

"WebParam5": "5",

"WebParam6": "6",

"Theme": "Blue Light",

"BodyWidth": 10,

"PrimaryFont": "PF1",

"SecondaryFont": "SF1",

"NavBackground": "NB1",

"NavColor": "NC1",

"OptionBackground": "OP1",

"OptionColor": "OC1",

"BodyBackground": "BB1",

"BodyColor": "#CCC1",

"HeadBackground": "HeadBackground",

"HeadColor": "HeadColor",

"MainMenuItemsColor": "MMIC1",

"MainMenuItemsBackground": "MMIB1",

"MainMenuItemsIcon": "MMII1",

"ProductBorder": "PB1",

"ProductTitleColor": "PTC1",

"ProductBackground": "PB1",

"QuickBuy": "QB1",

"ProductPadding": 12,

"ProductTitleWeight": 23,

"Photos": false,

"Boxed": true,

"ProductFilters": "PF1",

"HeadBoxShadow": true,

"H3": 21,

"HeadHeight": 31,

"Size1": 41,

"Size2": 51,

"Size3": 61,

"Size4": 71,

"Size5": 81,

"Var1": "V11",

"Var2": "V21",

"Var3": "V31",

"Var4": "V41",

"Var5": "V51",

"FacebookURL": "Facebook URL",

"TwitterURL": "Twitter URL",

"GooglePlusURL": "GooglePlus URL",

"ShowQtyAvailable": true,

"ShowDiscount": true

}

],

"totalRows": 1

}

Create:

URL: https://api.socratecloud.com/webapi/rest/wstore/create/{version}?accessToken={access_token}&WebContext=api.socratecloud.com

Method: POST

Return: Web Context for success or error message (start with "ERROR: ")

This is not a public method. Can be used after authentication process.

Mandatory fields:

  • Organization

  • WebContext

{

"Organization": "Demo SRL",

"Active": true,

"Name": "Test",

"Description": null,

"Comment": null,

"URL": "http://www.test.com",

"WebContext": "web-context",

"ProductWithoutPicture": false,

"RestrictivedRole": "AdminRole",

"Representative": "Demo Admin",

"Warehouse": "Warehouse 10",

"PriceList": "RON VNZ",

"PaymentTerm": "Pe loc",

"WebStoreInfo": "Web Store Info",

"WebStoreEmail": "Web Store Email",

"WebOrderEmail": "Web Order Email",

"WebRequestEmail": "Web Request Email",

"InfoEmail": "Info Email",

"WebStoreUser": "admin",

"WebStorePassword": null,

"EmailHeader": "Header",

"EmailFooter": "Footer",

"MenuOrders": true,

"MenuShipments": true,

"MenuInvoices": true,

"MenuAssets": true,

"MenuPayments": true,

"MenuRfQs": true,

"MenuRequests": true,

"MenuRegistrations": true,

"MenuInterests": true,

"MenuContact": true,

"ChangeReleaseReports": true,

"WebParam1": "1",

"WebParam2": "2",

"WebParam3": "3",

"WebParam4": "4",

"WebParam5": "5",

"WebParam6": "6",

"Theme": "Blue Light",

"BodyWidth": 10,

"PrimaryFont": "PF1",

"SecondaryFont": "SF1",

"NavBackground": "NB1",

"NavColor": "NC1",

"OptionBackground": "OP1",

"OptionColor": "OC1",

"BodyBackground": "BB1",

"BodyColor": "#CCC1",

"HeadBackground": "HeadBackground",

"HeadColor": "HeadColor",

"MainMenuItemsColor": "MMIC1",

"MainMenuItemsBackground": "MMIB1",

"MainMenuItemsIcon": "MMII1",

"ProductBorder": "PB1",

"ProductTitleColor": "PTC1",

"ProductBackground": "PB1",

"QuickBuy": "QB1",

"ProductPadding": 12,

"ProductTitleWeight": 23,

"Photos": false,

"Boxed": true,

"ProductFilters": "PF1",

"HeadBoxShadow": true,

"H3": 21,

"HeadHeight": 31,

"Size1": 41,

"Size2": 51,

"Size3": 61,

"Size4": 71,

"Size5": 81,

"Var1": "V11",

"Var2": "V21",

"Var3": "V31",

"Var4": "V41",

"Var5": "V51",

"FacebookURL": "Facebook URL",

"TwitterURL": "Twitter URL",

"GooglePlusURL": "GooglePlus URL",

"ShowQtyAvailable": true,

"ShowDiscount": true

}

Update:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/update/{version}?WebContext=api.socratecloud.com

Method: POST

Return: Web Context for success or error message (start with "ERROR: ")

The available themes name are: "Blue Light","Black Star","White Moon","Material Cards"

{

"WebParam1": "1",

"WebParam2": "2",

"WebParam3": "3",

"WebParam4": "4",

"WebParam5": "5",

"WebParam6": "6",

"Theme": "Blue Light",

"BodyWidth": 10,

"PrimaryFont": "PF1",

"SecondaryFont": "SF1",

"NavBackground": "NB1",

"NavColor": "NC1",

"OptionBackground": "OP1",

"OptionColor": "OC1",

"BodyBackground": "BB1",

"BodyColor": "#CCC1",

"HeadBackground": "HeadBackground",

"HeadColor": "HeadColor",

"MainMenuItemsColor": "MMIC1",

"MainMenuItemsBackground": "MMIB1",

"MainMenuItemsIcon": "MMII1",

"ProductBorder": "PB1",

"ProductTitleColor": "PTC1",

"ProductBackground": "PB1",

"QuickBuy": "QB1",

"ProductPadding": 12,

"ProductTitleWeight": 23,

"Photos": false,

"Boxed": true,

"ProductFilters": "PF1",

"HeadBoxShadow": true,

"H3": 21,

"HeadHeight": 31,

"Size1": 41,

"Size2": 51,

"Size3": 61,

"Size4": 71,

"Size5": 81,

"Var1": "V11",

"Var2": "V21",

"Var3": "V31",

"Var4": "V41",

"Var5": "V51",

"FacebookURL": "Facebook URL",

"TwitterURL": "Twitter URL",

"GooglePlusURL": "GooglePlus URL",

"ShowQtyAvailable": true,

"ShowDiscount": true

}

Get Background:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/background/{version}?WebContext=api.socratecloud.com

Method: GET

Return: image/png

Get Logo:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/logo/{version}?WebContext=api.socratecloud.com

Method: GET

Return: image/png

Get Carousel1:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/carousel1/{version}?WebContext=api.socratecloud.com

Method: GET

Return: image/png

Get Carousel2:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/carousel2/{version}?WebContext=api.socratecloud.com

Method: GET

Return: image/png

Get Carousel3:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/carousel3/{version}?WebContext=api.socratecloud.com

Method: GET

Return: image/png

Get Carousel4:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/carousel4/{version}?WebContext=api.socratecloud.com

Method: GET

Return: image/png

Get Carousel5:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/carousel5/{version}?WebContext=api.socratecloud.com

Method: GET

Return: image/png

Get Product Image Default:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/productdefault/{version}?WebContext=api.socratecloud.com

Method: GET

Return: image/png

Get Video MP4:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/video/mp4/{version}?WebContext=api.socratecloud.com

Method: GET

Return: video/mp4

Get Video OGG:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/video/ogg/{version}?WebContext=api.socratecloud.com

Method: GET

Return: video/ogg

Get Video MOV:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/video/mov/{version}?WebContext=api.socratecloud.com

Method: GET

Return: video/quicktime

Set Background:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/set/background/{version}?WebContext=api.socratecloud.com

Method: POST

Return 'Ok' for success or error message (start with "ERROR: ")

Set Logo:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/set/logo/{version}?WebContext=api.socratecloud.com

Method: POST

Return 'Ok' for success or error message (start with "ERROR: ")

Set Carousel1:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/set/carousel1/{version}?WebContext=api.socratecloud.com

Method: POST

Return 'Ok' for success or error message (start with "ERROR: ")

Set Carousel2:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/set/carousel2/{version}?WebContext=api.socratecloud.com

Method: POST

Return 'Ok' for success or error message (start with "ERROR: ")

Set Carousel3:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/set/carousel3/{version}?WebContext=api.socratecloud.com

Method: POST

Return: Ok

Set Carousel4:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/set/carousel4/{version}?WebContext=api.socratecloud.com

Method: POST

Return 'Ok' for success or error message (start with "ERROR: ")

Set Carousel5:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/set/carousel5/{version}?WebContext=api.socratecloud.com

Method: POST

Return 'Ok' for success or error message (start with "ERROR: ")

Set Product Image Default:

URL: https://api.socratecloud.com/webapi/rest/public/wstore/picture/set/productdefault/{version}?WebContext=api.socratecloud.com

Method: POST

Return 'Ok' for success or error message (start with "ERROR: ")