Render a support reply template
Fill a reply template for one ticket without sending anything.
Fill a reply template for one of your tickets and get the text back, ready for you to send as a reply. Nothing is sent, saved or refunded. The ticket supplies the customer's email, the ticket and order numbers, the product title, the store name, the customer's wallet balance, and its latest wallet refund that is still standing as refund_amount. Type what the ticket does not hold in values. To write the note for a wallet refund you are about to issue, send refund_amount_cents (and invoice_id when the ticket's order has several items): {refund_amount} and {wallet_balance} then describe that refund. Only active templates with supports_manual can be filled; any other returns 422 on supportReplyTemplate. A missing template, or another store's template or ticket, returns 404. Refusals: values and values.{placeholder} name the values still needed or invalid; values.refund_amount when a typed amount is not the ticket's wallet refund, or when the template shows a wallet balance for a ticket with no wallet refund; invoice_id when the item is not on the ticket's order or the order has several items and none was named; refund_amount_cents when the item has less than that left to refund; ticket_id when the ticket has no item left to refund. Requires the ticket API-key ability, and the key's user must be allowed to manage tickets in the store (the Resolution Center role, or owner or administrator). Safe to retry. OAuth callers use the admin grant and select a store with X-STORE. Current membership and role permissions apply to every request.
AuthorizationBearer <API Key>Provide your SellApp API key as a bearer token.
supportReplyTemplate*integerThe reply template ID.
X-STORE?stringStore slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.
application/json- body
ticket_id*integerThe ticket the reply is for.
1 <= valuevalues?Values the ticket does not hold, keyed by placeholder name without braces. Only order_id, product_title, refund_amount and wallet_balance are taken; others are ignored. Amounts are USD decimal strings such as "12.50"; text is at most 500 characters.
invoice_id?|The ticket's order item the refund note is about. Needed with refund_amount_cents when the order has several items.
1 <= valuerefund_amount_cents?|A wallet refund you are about to issue, in integer USD cents (999 means $9.99). It fills {refund_amount} and adds to {wallet_balance}, and cannot exceed what is left to refund on the item.
1 <= valueSuccessful response.
application/json- response
data*curl -X POST 'https://sell.app/api/v2/support-reply-templates/0/render' \ -H 'X-STORE: launch-lab' \ -H 'Content-Type: application/json' \ -d '{ "ticket_id": 4821, "invoice_id": 7001, "refund_amount_cents": 999}'{ "data": { "template_id": 32, "template_label": "Refund credited", "ticket_id": 4821, "text": "Hi maya.chen@example.com, we credited $9.99 to your Launch Lab wallet for Design kit. Your wallet balance is now $9.99.", "filled_from_ticket": [ "customer_email", "refund_amount", "store_name", "product_title", "wallet_balance" ], "filled_from_values": [] }}