{"files":{"SKILL.md":"---\nname: giftcard-api\ndescription: \"Giftcard API skill. Use when working with Giftcard for giftcards. Covers 11 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Giftcard API\nAPI version: 1.0\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/api\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /giftcards/{giftCardId}/transactions -- verify access\n3. POST /giftcards -- create first giftcards\n\n## Endpoints\n\n11 endpoints across 1 groups. See references/api-spec.lap for full details.\n\n### giftcards\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /giftcards | Create a gift card |\n| GET | /giftcards/{giftCardId} | Get a gift card by ID |\n| POST | /giftcards/_search | List all gift cards |\n| GET | /giftcards/{giftCardId}/transactions | List all gift card transactions |\n| POST | /giftcards/{giftCardId}/transactions | Create a gift card transaction |\n| GET | /giftcards/{giftCardId}/transactions/{transactionId} | Get a gift card transaction by ID |\n| GET | /giftcards/{giftCardId}/transactions/{transactionId}/authorization | Get a gift card transaction authorization |\n| GET | /giftcards/{giftCardId}/transactions/{transactionId}/cancellations | List all gift card transactions cancellations |\n| POST | /giftcards/{giftCardId}/transactions/{transactionId}/cancellations | Cancel a gift card transaction |\n| GET | /giftcards/{giftCardId}/transactions/{transactionId}/settlements | List all gift card transactions settlements |\n| POST | /giftcards/{giftCardId}/transactions/{transactionId}/settlements | Settle a gift card transaction |\n\n## Common Questions\n\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a giftcard?\" -> POST /giftcards\n- \"Get giftcard details?\" -> GET /giftcards/{giftCardId}\n- \"Create a _search?\" -> POST /giftcards/_search\n- \"List all transactions?\" -> GET /giftcards/{giftCardId}/transactions\n- \"Create a transaction?\" -> POST /giftcards/{giftCardId}/transactions\n- \"Get transaction details?\" -> GET /giftcards/{giftCardId}/transactions/{transactionId}\n- \"List all authorization?\" -> GET /giftcards/{giftCardId}/transactions/{transactionId}/authorization\n- \"List all cancellations?\" -> GET /giftcards/{giftCardId}/transactions/{transactionId}/cancellations\n- \"Create a cancellation?\" -> POST /giftcards/{giftCardId}/transactions/{transactionId}/cancellations\n- \"List all settlements?\" -> GET /giftcards/{giftCardId}/transactions/{transactionId}/settlements\n- \"Create a settlement?\" -> POST /giftcards/{giftCardId}/transactions/{transactionId}/settlements\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 giftcard-api -o references/api-spec.lap\n\n# Search for related APIs\nnpx @lap-platform/lapsh search giftcard-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 Giftcard API\n@base https://apiexamples.vtexcommercestable.com.br/api\n@version 1.0\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 11\n@toc giftcards(11)\n\n@endpoint POST /giftcards\n@desc Create a gift card\n@returns(200) {id: str, redemptionToken: str, redemptionCode: str, balance: num, relationName: str, emissionDate: str, expiringDate: str, caption: str, currencyCode: str, transactions: map{href: str}} # OK\n\n@endpoint GET /giftcards/{giftCardId}\n@desc Get a gift card by ID\n@required {giftCardId: str # Gift card identification.}\n@returns(200) {id: str, redemptionToken: str, redemptionCode: str, balance: num, emissionDate: str, expiringDate: str, currencyCode: str, transactions: map{href: str}} # OK\n\n@endpoint POST /giftcards/_search\n@desc List all gift cards\n@required {cart: map{grandTotal!: int, relationName!: str, redemptionCode!: str, discounts!: int, shipping!: int, taxes!: int, items!: [map], itemsTotal!: int} # Cart information., client: map{id!: str, email!: str, document!: str} # Client information.}\n@optional {REST-Range: str=resources=0-49 # Pagination control. This query variable must follow the format _resources={from}-{to}_.}\n@returns(200) {items: [map], paging: map{page: int, perPage: int, total: int, pages: int}} # OK\n\n@endpoint GET /giftcards/{giftCardId}/transactions\n@desc List all gift card transactions\n@required {giftCardId: str # Gift card identification.}\n@returns(200) OK\n\n@endpoint POST /giftcards/{giftCardId}/transactions\n@desc Create a gift card transaction\n@required {giftCardId: str # Gift card identification., operation: str # Type of operation. Possible values are: `Debit` or `Credit`., value: num(decimal) # Operation value., description: str # Description information., redemptionToken: str # Gift card redemption token., redemptionCode: str # Gift card identification code used at checkout. Minimum of 6 characters., requestId: str # Request identification of the transaction. You need to send a different `requestId` value every time you make a new transaction. If you send the same `requestId`two or more times with a specific `redemptionCode`or `redemptionToken`, the gift card balance will not be updated.}\n@optional {orderInfo: map{orderId: str, sequence: int, cart: map, clientProfile: map, shipping: map} # Order information.}\n@returns(200) {id: str, _self: map{href: str}} # OK\n\n@endpoint GET /giftcards/{giftCardId}/transactions/{transactionId}\n@desc Get a gift card transaction by ID\n@required {giftCardId: str # Gift card identification., transactionId: str # Transaction identification.}\n@returns(200) {value: num, description: str, date: str, requestId: str, settlement: map{href: str}, cancellation: map{href: str}, authorization: map{href: str}, operation: str} # OK\n\n@endpoint GET /giftcards/{giftCardId}/transactions/{transactionId}/authorization\n@desc Get a gift card transaction authorization\n@required {giftCardId: str # Gift card identification., transactionId: str # Transaction identification.}\n@returns(200) {oid: str, value: num, date: str} # OK\n\n@endpoint GET /giftcards/{giftCardId}/transactions/{transactionId}/cancellations\n@desc List all gift card transactions cancellations\n@required {giftCardId: str # Gift card identification., transactionId: str # Transaction identification.}\n@returns(200) OK\n\n@endpoint POST /giftcards/{giftCardId}/transactions/{transactionId}/cancellations\n@desc Cancel a gift card transaction\n@required {giftCardId: str # Gift card identification., transactionId: str # Transaction identification., value: num # Value information., requestId: str # VTEX request identifier.}\n@returns(200) {oid: str, value: num, date: str} # OK\n\n@endpoint GET /giftcards/{giftCardId}/transactions/{transactionId}/settlements\n@desc List all gift card transactions settlements\n@required {giftCardId: str # Gift card identification., transactionId: str # Transaction identification.}\n@returns(200) OK\n\n@endpoint POST /giftcards/{giftCardId}/transactions/{transactionId}/settlements\n@desc Settle a gift card transaction\n@required {giftCardId: str # Gift card identification., transactionId: str # Transaction identification., value: num # Value information., requestId: str # VTEX request identifier.}\n@returns(200) {oid: str, value: num, date: str} # OK\n@example_request {\"value\":17.4,\"requestId\":\"6360f98eb0cf6fd5afa77e39bba8c20fe5807d8c\"}\n\n@end\n"}}