{"files":{"SKILL.md":"---\nname: session-manager-api\ndescription: \"Session Manager API skill. Use when working with Session Manager for api. Covers 4 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Session Manager API\nAPI version: 1.0\n\n## Auth\nApiKey vtex_session in cookie | ApiKey vtex_segment in cookie\n\n## Base URL\nhttps://apiexamples.vtexcommercestable.com.br\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /api/sessions -- verify access\n3. POST /api/sessions -- create first sessions\n\n## Endpoints\n\n4 endpoints across 1 groups. See references/api-spec.lap for full details.\n\n### api\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /api/sessions | Create new session |\n| GET | /api/sessions | Get session |\n| PATCH | /api/sessions | Edit session |\n| GET | /api/segments | Get segment |\n\n## Common Questions\n\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a session?\" -> POST /api/sessions\n- \"List all sessions?\" -> GET /api/sessions\n- \"List all segments?\" -> GET /api/segments\n- \"How to authenticate?\" -> See Auth section\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints typically return the created/updated object\n\n## CLI\n\n```bash\n# Update this spec to the latest version\nnpx @lap-platform/lapsh get session-manager-api -o references/api-spec.lap\n\n# Search for related APIs\nnpx @lap-platform/lapsh search session-manager-api\n```\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Session Manager API\n@base https://apiexamples.vtexcommercestable.com.br\n@version 1.0\n@auth ApiKey vtex_session in cookie | ApiKey vtex_segment in cookie\n@endpoints 4\n@toc api(4)\n\n@endpoint POST /api/sessions\n@desc Create new session\n@required {public: map{additionalProperties: map} # Public information.}\n@returns(201) {sessionToken: str, segmentToken: str} # Created\n@example_request {\"public\":{\"variable1\":{\"value\":\"value1\"},\"variable2\":{\"value\":\"value2\"}}}\n\n@endpoint GET /api/sessions\n@desc Get session\n@required {items: str # Items are the keys of the values you wish to get. They follow the format `namespace1.key1,namespace2.key2`. \r \rIf you wish to recover the data sent on [Create new session](https://developers.vtex.com/docs/api-reference/session-manager-api#post-/api/sessions), it should be `public.{key}`, replacing `{key}` with the name of the custom property you created. Following the example request presented in [Create new session](https://developers.vtex.com/docs/api-reference/session-manager-api#post-/api/sessions), it would be `public.variable1,public.variable2`. \r \rIf you want to retrieve all keys from Session Manager, you can use the wildcard operator (`*`) as a value for this query parameter.}\n@returns(200) {id: str, namespaces: map{account: map{id: map{value: str, keepAlive: bool}, accountName: map{value: str}}, store: map{channel: map{value: str}, countryCode: map{value: str}, cultureInfo: map{value: str}, currencyCode: map{value: str}, currencySymbol: map{value: str}, channelPrivacy: map{value: str}}, public: map, checkout: map{regionId: map{value: str}}}} # OK\n\n@endpoint PATCH /api/sessions\n@desc Edit session\n@required {public: map{additionalProperties: map} # Public information.}\n@returns(200) {sessionToken: str, segmentToken: str} # OK\n@example_request {\"public\":{\"variable2\":{\"value\":\"value2_patched\"},\"variable3\":{\"value\":\"value3\"}}}\n\n@endpoint GET /api/segments\n@desc Get segment\n@returns(200) {campaigns: str?, channel: str, priceTables: str?, regionId: str, utm_campaign: str?, utm_source: str?, utmi_campaign: str?, currencyCode: str, currencySymbol: str, countryCode: str, cultureInfo: str, channelPrivacy: str} # OK\n\n@end\n"}}