404 Error | WiX Developer | Test Endpoint

I’m trying to test the Create Discount Endpoint for WiX Restaurants and I get a 404 Error: Entity not found for the catalogID. Can’t discover why. The catalogID exists. Permissions seem correct.

I’m expecting this code to work and a WiX Restaurants Discount to be created.

Can you help me?

  1. I setup a marketplace app for testing.

  2. I ensure the Permissions are set to Manage Catalog.

  3. I added the marketplace app to the site.

  4. I List Catalogs to get the CatalogID.

  5. I go to https://dev.wix.com/api/rest/wix-restaurants/catalogs/discounts/create-discount

  6. I click (Try it Out). Guess this is like Postman to test the API.

  7. I generate a test token for site instead of using oAuth token.

  8. I insert the catalogID of: 85ed1698-006e-4c6b-83b5-4d8968b0c439

  9. I include this in the body code, as shown below.

{
“discount”: {
“name”: “Hot Dog Discount”,
“description”: “10% Off Hot Dog Pickup Discount”,
“active”: true,
“percentage”: “10.00”,
“type”: “OFF_ITEM”,
“sectionIds”: {
“values”: [
“09a02386-7751-4c63-a13a-628ffb93587e”
]
}
}
}

This endpoint is in Developer Preview. Please contact support: Developer Support | Wix.com

Thank you. I cant find any documentation on this aspect. Had no idea the API’s were by invitation only. I assume they are working API’s but not open to all until Wix approves?

Hi

Hi - I discovered that I do have access and that I was not using the correct catalogId.

Although this is resolved now, I still have an issue when the discount is created. There are no parameters to create a discount coupon code or to toggle it on, and when this coupon discount toggle is off or not assigned a code then the discount reports an yellow banded issue note with it in the dashboard/Marketing/Restaurant Discounts until I manually toggle the coupon code to on and set it to either unlimited or a specific amount of redemptions limit. Once I toggle it manually, the issue note is not displayed, and all is fine. But we need to have it done automatically via the body of the data that is sent to the WiX Endpoint, and if the endpoint does not have a parameter, then I can’t se how it’s possible.

I don’t see any parameter in the Create Discount Object to set this upon API creation. Anyone come across this issue?