[#1394] create coupon code via API

Migrated from Redmine #1394 | Author: Erick Lara
Status: Feedback | Priority: Normal | Created: 2025-03-04


Looking to create a coupon code via API to go with my email app. The app currently sends an email automatically when their birthday is coming up fro a special discount. I need to be able to create a new coupon code to attach to every email.

Dmytro Bondarev wrote:

Hi, please have a look:

Erick Lara wrote:

thank so much for the fast reply…when try to run the script I get the following:

I am able to run “get promotions list” and “get gift card list” and “get coupons list” without issues but I have the following when trying to issue gift

[Error] Origin https://vilux.it is not allowed by Access-Control-Allow-Origin. Status code: 404
[Error] Fetch API cannot load https://user-api-v2.simplybook.me/admin/promotions/issue-gift-cards due to access control checks.
[Error] Failed to load resource: Origin https://vilux.it is not allowed by Access-Control-Allow-Origin. Status code: 404 (issue-gift-cards, line 0)