{ "parameters": [ ], "response_fields": [ ], "requests": [ { "request_headers": { }, "request_query_parameters": { "session_id": "session_1" }, "response_headers": { "X-Frame-Options": "SAMEORIGIN", "X-XSS-Protection": "1; mode=block", "X-Content-Type-Options": "nosniff", "X-Download-Options": "noopen", "X-Permitted-Cross-Domain-Policies": "none", "Referrer-Policy": "strict-origin-when-cross-origin", "Date": "Wed, 27 Nov 2019 00:51:36 GMT", "Content-Type": "application/json; charset=utf-8", "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Headers": "*", "Access-Control-Allow-Methods": "GET, POST, PATCH, PUT, DELETE, OPTIONS", "X-Workarea-Segmented-Content": "true", "X-Requested-With": "", "Vary": "X-Requested-With, X-Workarea-Segments", "Last-Modified": "Wed, 27 Nov 2019 00:51:36 GMT", "Cache-Control": "no-cache, no-store, must-revalidate", "X-Request-Id": "f4a84544-444b-49ed-b271-bca835333e42", "X-Runtime": "0.006377", "X-Workarea-Segments": "first_time_customer", "Expires": "0", "Content-Length": "1038" }, "request_method": "GET", "request_path": "/api/storefront/system_content/home_page?session_id=session_1", "request_body": null, "request_content_type": null, "response_status": 200, "response_status_text": "OK", "response_body": "{\n \"id\": \"5dddc8971241596aa5204b4f\",\n \"name\": \"Home Page\",\n \"url\": \"http://www.example.com/api/storefront/system_content/Home%20Page\",\n \"browser_title\": \"Home Page\",\n \"meta_description\": \"Shop online for Workarea API products\",\n \"content_blocks\": [\n {\n \"id\": \"5dddc8981241596aa5204b50\",\n \"type\": \"text\",\n \"area\": \"default\",\n \"data\": {\n \"text\": \"Thanks for your order!\"\n },\n \"hidden_breakpoints\": [\n\n ],\n \"position\": 0,\n \"html\": \"
Workarea supports segmenting users by number of orders, revenue, etc.
\nFor this functionality to work for users without accounts, you'll
\nneed to maintain and pass a session_id
consistently throughout calls
\nto the API.
An instance of Metrics::User
will be found or created for that
\nsession_id
, and data about the user will be tracked there.
Assuming use of the session_id
consistently through checkout, this
\nexample shows getting home page content for two different anonymous
\nusers and getting segmented content back.