04-21-2024 12:26 PM
Hello,
I'm trying to create a promotion with a coupon code
I get an incomprehensible error. anyone have any ideas?
{
"errors": [
{
"errorId": 2003,
"domain": "ACCESS",
"category": "APPLICATION",
"message": "Internal error",
"longMessage": "There was a problem with an eBay internal system or process. Contact eBay developer support for assistance"
}
]
}
https://api.sandbox.ebay.com/sell/marketing/v1/item_promotion
request:
{
"name": "promo $20",
"description": "promo $20",
"startDate": "2024-04-21T16:29:13.000Z",
"endDate": "2024-05-06T13:28:00.000Z",
"marketplaceId": "EBAY_US",
"promotionStatus": "DRAFT",
"promotionImageUrl": "https://i.ebayimg.com/images/g/-u8AAOSw29xizrlx/s-l640.jpg",
"priority": "PRIORITY_2",
"inventoryCriterion": {
"inventoryCriterionType": "INVENTORY_ANY",
"inventoryItems": null,
"listingIds": null,
"ruleCriteria": {
"selectionRules": null,
"excludeInventoryItems": null,
"excludeListingIds": null,
"markupListingIds": null,
"markupInventoryItems": null
}
},
"discountRules": [
{
"discountSpecification": {
"minQuantity": 1
},
"discountBenefit": {
"amountOffOrder": {
"value": "20",
"currency": "USD"
}
},
"ruleOrder": -1,
"maxDiscountAmount": {
"value": "20",
"currency": "USD"
}
}
],
"couponConfiguration": {
"couponCode": "20DISCOUNT",
"couponType": "PRIVATE_SINGLE_SELLER_COUPON",
"maxCouponRedemptionPerUser": 1
},
"promotionType": "CODED_COUPON"
}
10-14-2024 02:38 PM
Hello irondt,
Like this forum post states, https://community.ebay.com/t5/RESTful-Sell-APIs-Account/Inventory-API-Error-Id-2003/td-p/33573853 , it's probably an issue with what is in your payload. I remember about a year ago I was doing something that got me this error and it turned out to be something like formatting data wrong in a payload for a POST request.
One thing I noticed was you put down the "priority" field which states it can only be used if you have promotionType set to ORDER_DISCOUNT