- Support
- Product Releases
- Blog
- Overview
- API References
- API Authentication
- Getting Started with fabric APIs
- Making your first API request
- Example
- Using Developer Portal
- Security and Compliance
- Product Catalog API - Overview
- Developer Guide
Attributes & Attribute Mapping
Categories
Products
Collections
Background Jobs
Bulk Import & Export
Published Products
Allocations
- Orders (3.0.0)
Backorders Preorders
Exports
Developer Guide
Invoices
Shopping Lists
Shopping List Items
Notifications
Orders
Returns
Cancellations
Tracking
Frauds
Payments
Appeasements
Credits
Shipments
Shipping Methods
Shipping Method Items
Webhooks
- Orders FAQ(s)
- Overview
- Algolia standard integration
- Avalara standard integration
- Constructor.io standard integration
- Stripe standard integration
- Offers (3.0.0)
Real-time Pricing Engine
Promotions
Webhook Events
Redemptions
Priced Products
Product Exclusion Lists
Price Types
Coupons
Coupon Codes
Segments
Prices
Price Methods
Price Controls
Price Lists
Add-ons
Exports
Imports
Attributes
Customer Profile
Customer Address
Customer Self
Getting Started
Product Catalog
Orders
Integrations
Offers
Customers
Bulk update coupon codes
Use this endpoint to update multiple coupon codes using identifiers. Identifiers are a unique combination of a coupon code and a promotion ID. You can update up to 25 codes at a time.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Merchant's 24-character tenant ID
The sales channel ID.
The platform where the request is made.
A unique request ID.
The details to update the coupon codes.
The coupon codes to be updated.
curl --request PUT \
--url https://api.fabric.inc/v3/coupon-codes/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-channel-id: <x-fabric-channel-id>' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '{
"data": [
{
"identifier": {
"promotionId": "6380e7ecb419a30009865fad",
"couponCode": "XMAS2022"
},
"userId": "6380e7ecb419a30009865fad",
"status": "ACTIVE",
"additionalAttributes": [
{
"name": "brand",
"values": "Nike"
}
]
}
]
}'
{
"data": [
{
"id": "641cf99d2de161c5a6d7a481",
"title": "Summer coupons",
"userId": "5e2cfb9b45570b000864c4b5",
"couponCode": "SUMMER",
"versionId": 3,
"promotionId": "641cf986ca5b2c3180787e05",
"startAt": "2023-08-10T19:00:00.000Z",
"endAt": "2023-08-10T09:10:57.811Z",
"status": "ACTIVE",
"additionalAttributes": [
{
"name": "brand",
"values": "2"
}
],
"promotionAdditionalAttributes": [
{
"name": "eventName",
"values": "Store sale"
}
],
"createdAt": "2019-08-20T14:15:22Z",
"updatedAt": "2019-08-20T14:15:22Z"
}
],
"errors": [
{
"identifier": {
"promotionId": "6380e7ecb419a30009865fad",
"couponCode": "XMAS2022"
},
"type": "COUPON_CODE_NOT_FOUND",
"message": "Coupon code not found"
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Merchant's 24-character tenant ID
The sales channel ID.
The platform where the request is made.
A unique request ID.
Body
The coupon codes to be updated.
The ID of the coupon code. It is a unique combination of a coupon code and the associated promotion ID.
A 24-character system-generated promotion ID.
The coupon code.
The ID of the user who can redeem the coupon.
Coupon code status. ACTIVE
represents the coupon codes are ready to be redeemed and INACTIVE
represents the coupon codes are disabled and cannot be redeemed.
ACTIVE
, INACTIVE
The merchant-specified additional attributes for the coupon code.
The merchant-specified name
associated with the coupon code.
The merchant-specified values
for the name
attribute associated with the coupon code.
Response
The list of updated coupon codes.
24-character system-generated coupon code
Title of the promotion associated with the coupon code
User ID of the user who created the coupon code
Coupon code
Version ID of the coupon code, for internal reference
24-character system-generated promotion ID
Start date of the coupon code, in UTC format
End date of the coupon code, in UTC format
Status of the coupon code
ACTIVE
, INACTIVE
, REDEEMED
Merchant-specified attributes associated with the coupon code
Merchant-specified attribute name
associated with the coupon code
Merchant-specified attribute value
associated with the coupon code
Merchant-specified attributes of the promotion associated with the coupon code
Merchant-specified attribute name
associated with the related promotion
Merchant-specified attribute value
associated with the related promotion
Record's creation time
Record's last updated time
The list of possible errors.
The ID of the coupon code. It is a unique combination of couponCode
and associated promotionId
.
A 24-character system-generated promotion ID.
The coupon code.
The error code.
An error message corresponding to the type
.
Was this page helpful?
curl --request PUT \
--url https://api.fabric.inc/v3/coupon-codes/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-fabric-channel-id: <x-fabric-channel-id>' \
--header 'x-fabric-tenant-id: <x-fabric-tenant-id>' \
--data '{
"data": [
{
"identifier": {
"promotionId": "6380e7ecb419a30009865fad",
"couponCode": "XMAS2022"
},
"userId": "6380e7ecb419a30009865fad",
"status": "ACTIVE",
"additionalAttributes": [
{
"name": "brand",
"values": "Nike"
}
]
}
]
}'
{
"data": [
{
"id": "641cf99d2de161c5a6d7a481",
"title": "Summer coupons",
"userId": "5e2cfb9b45570b000864c4b5",
"couponCode": "SUMMER",
"versionId": 3,
"promotionId": "641cf986ca5b2c3180787e05",
"startAt": "2023-08-10T19:00:00.000Z",
"endAt": "2023-08-10T09:10:57.811Z",
"status": "ACTIVE",
"additionalAttributes": [
{
"name": "brand",
"values": "2"
}
],
"promotionAdditionalAttributes": [
{
"name": "eventName",
"values": "Store sale"
}
],
"createdAt": "2019-08-20T14:15:22Z",
"updatedAt": "2019-08-20T14:15:22Z"
}
],
"errors": [
{
"identifier": {
"promotionId": "6380e7ecb419a30009865fad",
"couponCode": "XMAS2022"
},
"type": "COUPON_CODE_NOT_FOUND",
"message": "Coupon code not found"
}
]
}