vtex.local – Session-Manager-API
This documentation goes in detail how to interact with Session Manager's API. For a more top-level approach, check the .
- Homepage
- https://api.apis.guru/v2/specs/vtex.local:Session-Manager-API/1.0.json
- Provider
- vtex.local:Session-Manager-API / Session-Manager-API
- OpenAPI version
- 3.0.0
- Spec (JSON)
- https://api.apis.guru/v2/specs/vtex.local/Session-Manager-API/1.0/openapi.json
- Spec (YAML)
- https://api.apis.guru/v2/specs/vtex.local/Session-Manager-API/1.0/openapi.yaml
Tools (6)
Extracted live via the executor SDK.
-
segment.getSegmentYou can add certain public fields in the query string and the system will attempt to fulfill it. Values such as
cultureInfoandutmare overwriteable, just keep in mind such changes will not be reflected in the client's session.If you wish to change the value on the session (and thus be reflected on the segment without special query strings), then use the PATCH request to session.
-
sessions.createnewsessionThe response should contain a session cookie. Further
POSTorPATCHrequests will edit the existing session rather than creating a new one. All parameters in the body that are not within the public namespace will be ignored. Query string items will automatically be added to the public namespace. Cookies relevant to the session manager execution are also recorded.The sessions API uses the
vtex_sessioncookie to store the data required to identify the user and the session. This cookie is stored in the user's browser when the session is created and sent automatically in every request to that domain. You will have to reproduce that in order for it to work outside of a browser environment. -
sessions.editsessionThis works exactly the same as the POST create session, but when the request is sent with a vtex_session cookie, it retrieves the session first and then applies the changes instead of generating a new one.
As with the
POSTmethod, only keys inside the public namespace on the body are considered, and query parameters are automatically added to the public namespace.The sessions API uses the
vtex_sessioncookie to store the data required to identify the user and the session. This cookie is stored in the user's browser when the session is created and sent automatically in every request to that domain. You will have to reproduce that in order for it to work outside of a browser environment. -
sessions.getSessionItems are the keys of the values you wish to get. It follows the format
namespace1.key1,namespace2.key2. So if you wish to recover the data sent on the previous request, it should bepublic.country,public.postalCode.The sessions API uses the
vtex_sessioncookie to store the data required to identify the user and the session. This cookie is stored in the user's browser when the session is created and sent automatically in every request to that domain. You will have to reproduce that in order for it to work outside of a browser environment.If you want to retrieve all keys from Session Manager, you can use the wildcard operator (
*) in your request (i.e.?items=*). -
openapi.previewSpecPreview an OpenAPI document before adding it as a source
-
openapi.addSourceAdd an OpenAPI source and register its operations as tools