tray-cupons

Manage Tray discount coupons via the /discount_coupons API endpoints.

14|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/tray-tecnologia/tray-api-claude-plugin --skill tray-cupons
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tray-cupons
Source: https://github.com/tray-tecnologia/tray-api-claude-plugin/tree/main/skills/cupons
Command: npx skills add https://github.com/tray-tecnologia/tray-api-claude-plugin --skill tray-cupons

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides clear, actionable documentation and examples to manage discount coupons in Tray, removing uncertainty about endpoints, payload formats, authentication, pagination, and relationship handling so developers can implement coupon workflows reliably.

Core Features & Use Cases

  • Full CRUD for coupons: list, retrieve, create, update, and delete discount coupons via the /discount_coupons endpoints.
  • Relationship management: bind coupons to customers, products, categories, brands, and shipping methods using the create_relationship endpoint and correct payload wrappers.
  • Practical guidance: explains authentication (access_token query), pagination limits, required form-encoded wrappers, field meanings (code, type, value, limits), and best practices for batch operations and constraints.

Quick Start

Create a 10% coupon named PROMO10 valid for 30 days and bind it to product IDs 456 and 789 using the Tray /discount_coupons endpoints and the create_relationship POST.

Frequently Asked Questions about tray-cupons

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create discount coupons in Tray via the API?

You authenticate Tray API requests by appending your access_token as a query parameter to the /discount_coupons endpoint URL, ensuring secure access for coupon CRUD and relationship operations.

Can I bind a Tray discount coupon to specific products and customers?

Tray API coupon management supports full CRUD operations, allowing you to list, retrieve, update, and delete discount coupons, as well as query coupon eligibility for specific e-commerce integration scenarios.

How do I handle pagination when listing Tray discount coupons?

Tray API coupon creation requires form-encoded payloads wrapped in a DiscountCoupon object, meaning you must structure your POST body with correct field names like code, type, and value for successful insertion.

Does the Tray API support batch-creating discount coupons for e-commerce automation?

Yes, the Tray API supports e-commerce automation tasks that batch-create coupons by repeatedly calling the /discount_coupons endpoint with form-encoded payloads and managing relationships for each.