{"files":{"SKILL.md":"---\nname: policies-system-api\ndescription: \"Policies System API skill. Use when working with Policies System for api. Covers 6 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Policies System API\n\n## Auth\nApiKey X-VTEX-API-AppKey in header | ApiKey X-VTEX-API-AppToken in header | ApiKey VtexIdclientAutCookie in header\n\n## Base URL\nhttps://apiexamples.vtexcommercestable.com.br\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /api/policy-engine/policies -- verify access\n3. POST /api/policy-engine/evaluate -- create first evaluate\n\n## Endpoints\n\n6 endpoints across 1 groups. See references/api-spec.lap for full details.\n\n### api\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /api/policy-engine/policies | Get policy list |\n| POST | /api/policy-engine/evaluate | Evaluate policies |\n| GET | /api/policy-engine/policies/{id} | Get policy by ID |\n| POST | /api/policy-engine/policies/{id} | Create policy |\n| PUT | /api/policy-engine/policies/{id} | Update policy |\n| DELETE | /api/policy-engine/policies/{id} | Delete policy by ID |\n\n## Common Questions\n\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"List all policies?\" -> GET /api/policy-engine/policies\n- \"Create a evaluate?\" -> POST /api/policy-engine/evaluate\n- \"Get policy details?\" -> GET /api/policy-engine/policies/{id}\n- \"Update a policy?\" -> PUT /api/policy-engine/policies/{id}\n- \"Delete a policy?\" -> DELETE /api/policy-engine/policies/{id}\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 policies-system-api -o references/api-spec.lap\n\n# Search for related APIs\nnpx @lap-platform/lapsh search policies-system-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 Policies System API\n@base https://apiexamples.vtexcommercestable.com.br\n@auth ApiKey X-VTEX-API-AppKey in header | ApiKey X-VTEX-API-AppToken in header | ApiKey VtexIdclientAutCookie in header\n@common_fields {Content-Type: str=application/json # Type of the content being sent., Accept: str=application/json # HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.}\n@endpoints 6\n@toc api(6)\n\n@endpoint GET /api/policy-engine/policies\n@desc Get policy list\n@returns(200) OK\n\n@endpoint POST /api/policy-engine/evaluate\n@desc Evaluate policies\n@required {resource: str # Scope on which this policy must be evaluated., context: map # Conditions that the policy needs to satisfy.}\n@returns(200) OK\n@example_request {\"resource\":\"vrn:vtex.promotions-alert:aws-us-east-1:kamila:master:/_v/promotions_alert\",\"context\":{\"brandId\":\"2000001\",\"discountPercentage\":\"91.00\"}}\n\n@endpoint GET /api/policy-engine/policies/{id}\n@desc Get policy by ID\n@required {id: str # Policy ID.}\n@returns(200) OK\n\n@endpoint POST /api/policy-engine/policies/{id}\n@desc Create policy\n@required {id: str # Policy ID., name: str # Policy name., description: str # Policy description, only for internal use., statements: [map{effect!: str, actions: [map], resource: str, condition: map}] # Requirements for the the policy to be applied.}\n@optional {status: str # The status field defines if the policy is `active` or `inactive`. An `active` policy is enforced, while an `inactive` policy is stored but not applied.}\n@returns(200) OK\n\n@endpoint PUT /api/policy-engine/policies/{id}\n@desc Update policy\n@required {id: str # Policy ID., name: str # Policy name., description: str # Policy description, only for internal use., statements: [map{effect!: str, actions: [map], resource: str, condition: map}] # Requirements for the the policy to be applied.}\n@optional {status: str # The status field defines if the policy is `active` or `inactive`. An `active` policy is enforced, while an `inactive` policy is stored but not applied.}\n@returns(200) OK\n\n@endpoint DELETE /api/policy-engine/policies/{id}\n@desc Delete policy by ID\n@required {id: str # Policy ID.}\n@returns(200) 200 OK\n\n@end\n"}}