{"files":{"SKILL.md":"---\nname: giftcard-hub-api\ndescription: \"Giftcard Hub API skill. Use when working with Giftcard Hub for api. Covers 15 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Giftcard Hub 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\n\n## Setup\n1. Set your API key in the appropriate header\n2. GET /api/giftcardproviders -- verify access\n3. POST /api/giftcardproviders/{giftCardProviderId}/giftcards -- create first giftcards\n\n## Endpoints\n\n15 endpoints across 1 groups. See references/api-spec.lap for full details.\n\n### api\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /api/giftcardproviders | List all gift card providers |\n| GET | /api/giftcardproviders/{giftCardProviderId} | Get a gift card provider by ID |\n| PUT | /api/giftcardproviders/{giftCardProviderId} | Create or update a gift card provider by ID |\n| DELETE | /api/giftcardproviders/{giftCardProviderId} | Delete a gift card provider by ID |\n| POST | /api/giftcardproviders/{giftCardProviderId}/giftcards | Create a gift card at a gift card provider |\n| POST | /api/giftcardproviders/{giftCardProviderId}/giftcards/_search | Get a gift card from a gift card provider |\n| GET | /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId} | Get a gift card from a gift card provider by ID |\n| GET | /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions | List all gift card transactions |\n| POST | /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions | Create a gift card transaction |\n| GET | /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{transactionId} | Get a gift card transaction by ID |\n| GET | /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/authorization | Get a gift card transaction authorization |\n| GET | /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/settlements | List all gift card transactions settlements |\n| POST | /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/settlements | Settle a gift card transaction |\n| GET | /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/cancellations | List all gift card transactions cancellations |\n| POST | /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/cancellations | Cancel a gift card transaction |\n\n## Common Questions\n\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"List all giftcardproviders?\" -> GET /api/giftcardproviders\n- \"Get giftcardprovider details?\" -> GET /api/giftcardproviders/{giftCardProviderId}\n- \"Update a giftcardprovider?\" -> PUT /api/giftcardproviders/{giftCardProviderId}\n- \"Delete a giftcardprovider?\" -> DELETE /api/giftcardproviders/{giftCardProviderId}\n- \"Create a giftcard?\" -> POST /api/giftcardproviders/{giftCardProviderId}/giftcards\n- \"Create a _search?\" -> POST /api/giftcardproviders/{giftCardProviderId}/giftcards/_search\n- \"Get giftcard details?\" -> GET /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}\n- \"List all transactions?\" -> GET /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions\n- \"Create a transaction?\" -> POST /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions\n- \"Get transaction details?\" -> GET /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{transactionId}\n- \"List all authorization?\" -> GET /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/authorization\n- \"List all settlements?\" -> GET /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/settlements\n- \"Create a settlement?\" -> POST /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/settlements\n- \"List all cancellations?\" -> GET /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/cancellations\n- \"Create a cancellation?\" -> POST /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/cancellations\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-hub-api -o references/api-spec.lap\n\n# Search for related APIs\nnpx @lap-platform/lapsh search giftcard-hub-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 Hub API\n@base https://apiexamples.vtexcommercestable.com.br\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 15\n@toc api(15)\n\n@endpoint GET /api/giftcardproviders\n@desc List all gift card providers\n@optional {REST-Range: str=resources=0-49 # Pagination control. This query variable must follow the format `_resources={from}-{to}_`.}\n@returns(200) OK\n\n@endpoint GET /api/giftcardproviders/{giftCardProviderId}\n@desc Get a gift card provider by ID\n@required {giftCardProviderId: str # Gift card provider identification.}\n@returns(200) {id: str, serviceUrl: str, oauthProvider: str, caption: str, preAuthEnabled: bool, cancelEnabled: bool, _self: map} # OK\n@errors {500: Object reference not set to an instance of an object (The gift card provider described does not exist).}\n\n@endpoint PUT /api/giftcardproviders/{giftCardProviderId}\n@desc Create or update a gift card provider by ID\n@required {giftCardProviderId: str # Gift card provider identification.}\n@returns(200) {id: str, serviceUrl: str, oauthProvider: str, preAuthEnabled: bool, cancelEnabled: bool, _self: map} # OK\n\n@endpoint DELETE /api/giftcardproviders/{giftCardProviderId}\n@desc Delete a gift card provider by ID\n@required {giftCardProviderId: str # Gift card provider identification.}\n@returns(200) OK. This endpoint does not return any data in the response body.\n@errors {404: Not Found}\n\n@endpoint POST /api/giftcardproviders/{giftCardProviderId}/giftcards\n@desc Create a gift card at a gift card provider\n@required {giftCardProviderId: str # Gift card provider identification.}\n@returns(200) {id: str, emissionDate: str, expiringDate: str, caption: str, provider: str, discount: bool, currencyCode: str, transaction: map{href: str}} # OK\n\n@endpoint POST /api/giftcardproviders/{giftCardProviderId}/giftcards/_search\n@desc Get a gift card from a gift card provider\n@required {giftCardProviderId: str # Gift card provider identification.}\n@optional {REST-Range: str=resources=0-49 # Pagination control. This query variable must follow the format `_resources={from}-{to}_`.}\n@returns(200) OK\n\n@endpoint GET /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}\n@desc Get a gift card from a gift card provider by ID\n@required {giftCardProviderId: str # Gift card provider identification., giftCardId: str # Gift card identification.}\n@returns(200) {id: str, redemptionToken: str, redemptionCode: str, balance: num, emissionDate: str, expiringDate: str, currencyCode: str, discount: bool, transactions: map{href: str}} # OK\n\n@endpoint GET /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions\n@desc List all gift card transactions\n@required {giftCardProviderId: str # Gift card provider identification., giftCardId: str # Gift card identification.}\n@returns(200) OK\n\n@endpoint POST /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions\n@desc Create a gift card transaction\n@required {giftCardProviderId: str # Gift card provider identification., giftCardId: str # Gift card identification.}\n@returns(200) {cardId: str, id: str, _self: map{href: str}} # OK\n\n@endpoint GET /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{transactionId}\n@desc Get a gift card transaction by ID\n@required {giftCardProviderId: str # Gift card provider identification., 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 /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/authorization\n@desc Get a gift card transaction authorization\n@required {giftCardProviderId: str # Gift card provider identification., giftCardId: str # Gift card identification., tId: str # Transaction ID generated by the provider. It is different from the `transactionId` generated by VTEX.}\n@returns(200) {oid: str, value: num, date: str} # OK\n\n@endpoint GET /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/settlements\n@desc List all gift card transactions settlements\n@required {giftCardProviderId: str # Gift card provider identification., giftCardId: str # Gift card identification., tId: str # Transaction ID generated by the provider. It is different from the `transactionId` generated by VTEX.}\n@returns(200) OK\n\n@endpoint POST /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/settlements\n@desc Settle a gift card transaction\n@required {giftCardProviderId: str # Gift card provider identification., giftCardId: str # Gift card identification., tId: str # Transaction ID generated by the provider. It is different from the `transactionId` generated by VTEX., value: num # Transaction value., requestId: str # Request identification of the transaction.}\n@returns(200) OK\n\n@endpoint GET /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/cancellations\n@desc List all gift card transactions cancellations\n@required {giftCardProviderId: str # Gift card provider identification., giftCardId: str # Gift card identification., tId: str # Transaction ID generated by the provider. It is different from the `transactionId` generated by VTEX.}\n@returns(200) OK\n\n@endpoint POST /api/giftcardproviders/{giftCardProviderId}/giftcards/{giftCardId}/transactions/{tId}/cancellations\n@desc Cancel a gift card transaction\n@required {giftCardProviderId: str # Gift card provider identification., giftCardId: str # Gift card identification., tId: str # Transaction ID generated by the provider. It is different from the `transactionId` generated by VTEX.}\n@returns(200) {oid: str, value: num, date: str} # OK\n\n@end\n"}}