REST API for Latepoint icon

REST API for Latepoint

Consume REST API for LatePoint on Tools

Coupons → Update

AI-generated

Summary

Update a coupon identified by its alphanumeric code by sending specified fields or a custom JSON/form body to modify the coupon's details.

Inputs

  • Coupon Code (required) — Specify the unique alphanumeric coupon code to update.
  • Send Body — Optional flag to send a custom JSON or form data body instead of individual fields.
  • Body Content Type — If sending a custom body, specify whether it's JSON or form data.
  • JSON Body — Custom JSON object to send as the request body when 'Send Body' is true and content type is JSON.
  • Form Data — Custom form data parameters to send as the request body when 'Send Body' is true and content type is form data.
  • Additional Fields — Individual fields to update such as name, description, discount_type, discount_value, active_from, active_to, and usage_limit when 'Send Body' is false.

Output shape

a single record containing the updated coupon data as JSON

The operation outputs the updated coupon record as returned by the Latepoint API. If 'Send Body' is used with a custom body, the request body replaces the usual individual fields. The coupon is identified by the provided coupon code.

Examples

Example 1: Update a coupon's discount value by specifying its code and new discount_value in Additional Fields.

Set 'Coupon Code' to the target coupon's code, 'Send Body' to false, and include 'discount_value' in Additional Fields.

Example 2: Update a coupon by sending a custom JSON body specifying multiple fields.

Set 'Coupon Code' to the target coupon's code, 'Send Body' to true, 'Body Content Type' to JSON, and provide the JSON in 'JSON Body'.

Links

Discussion