Download OpenAPI specification:Download
All endpoints require the Authorization header to be set with a valid JWT token for the respective environment.
The endpoints are for managing and modifying coupons. This will typically be done by a project admin in the Retailer Portal or by direct access.
| projectID required | string ID of the project |
object | |
| channels required | Array of strings (CouponChannels) Items Enum: "app" "sco" List of distribution channels |
| type required | string (CouponType) Discriminator to distinguish different kinds of coupons |
| redeemType | string (CouponRedeemType) Enum: "once-per-scanned-code" "once-per-app-user-id" "multiple" Discriminator to distinguish different ways to redeem a coupon |
| processingType | string (CouponProcessingType) Enum: "custom" "none" "builtin" How to process coupons |
| requiresLoyaltyCard | boolean (RequiresLoyaltyCardType) Coupon requires loyalty card for redemption |
| validFrom | string <date-time> (ValidFrom) The date and time the coupon is valid from (inclusive) |
| validUntil | string <date-time> (ValidUntil) The date and time the coupon is valid until (inclusive) |
object (AdditionalAttributes) Additional attributes of a coupon |
{- "id": "manual-50-percent-discount",
- "channels": [
- "app"
], - "type": "manual",
- "redeemType": "multiple",
- "processingType": "builtin",
- "translations": {
- "name": {
- "en": "Discount 50%",
- "de": "Rabatte 50%"
}, - "description": {
- "en": "Special discount with a whopping 50%",
- "de": "Sonderrabatte mit ganzem 50%"
}
}, - "validFrom": "2021-04-26T00:00:00+02:00",
- "validUntil": "2021-07-26T00:00:00+02:00"
}{- "id": "special-offer-123456",
- "projectID": "another-project",
- "channels": [
- "app"
], - "type": "manual",
- "redeemType": "multiple",
- "processingType": "builtin",
- "name": "Rabatte 50%",
- "description": "Sonderrabatte mit ganzem 50%",
- "translations": {
- "name": {
- "en": "Discount 50%",
- "de": "Rabatte 50%"
}, - "description": {
- "en": "Special discount with a whopping 50%",
- "de": "Sonderrabatte mit ganzem 50%"
}
}, - "validFrom": "2021-04-26T00:00:00+02:00",
- "validUntil": "2021-07-26T00:00:00+02:00",
- "links": {
}
}Retrieve a coupon
| projectID required | string ID of the project |
| couponID required | string ID of a coupon |
{- "id": "special-offer-123456",
- "projectID": "another-project",
- "channels": [
- "app"
], - "type": "manual",
- "redeemType": "multiple",
- "processingType": "builtin",
- "name": "Rabatte 50%",
- "description": "Sonderrabatte mit ganzem 50%",
- "translations": {
- "name": {
- "en": "Discount 50%",
- "de": "Rabatte 50%"
}, - "description": {
- "en": "Special discount with a whopping 50%",
- "de": "Sonderrabatte mit ganzem 50%"
}
}, - "validFrom": "2021-04-26T00:00:00+02:00",
- "validUntil": "2021-07-26T00:00:00+02:00",
- "links": {
}
}Update an existing coupon
| projectID required | string ID of the project |
| couponID required | string ID of a coupon |
| If-Match required | string The ETag of the resource. If the provided ETag does not match the current ETag of the resource, the request will fail with a 412 Precondition Failed error. Asterisk is supported as wildcard. |
object | |
| channels required | Array of strings (CouponChannels) Items Enum: "app" "sco" List of distribution channels |
| type required | string (CouponType) Discriminator to distinguish different kinds of coupons |
| redeemType | string (CouponRedeemType) Enum: "once-per-scanned-code" "once-per-app-user-id" "multiple" Discriminator to distinguish different ways to redeem a coupon |
| processingType | string (CouponProcessingType) Enum: "custom" "none" "builtin" How to process coupons |
| requiresLoyaltyCard | boolean (RequiresLoyaltyCardType) Coupon requires loyalty card for redemption |
| validFrom | string <date-time> (ValidFrom) The date and time the coupon is valid from (inclusive) |
| validUntil | string <date-time> (ValidUntil) The date and time the coupon is valid until (inclusive) |
object (AdditionalAttributes) Additional attributes of a coupon |
{- "channels": [
- "app"
], - "type": "manual",
- "redeemType": "multiple",
- "processingType": "builtin",
- "translations": {
- "name": {
- "en": "Discount 50%",
- "de": "Rabatte 50%"
}, - "description": {
- "en": "Special discount with a whopping 50%",
- "de": "Sonderrabatte mit ganzem 50%"
}
}, - "validFrom": "2021-04-26T00:00:00+02:00",
- "validUntil": "2021-07-26T00:00:00+02:00"
}{- "id": "special-offer-123456",
- "projectID": "another-project",
- "channels": [
- "app"
], - "type": "manual",
- "redeemType": "multiple",
- "processingType": "builtin",
- "name": "Rabatte 50%",
- "description": "Sonderrabatte mit ganzem 50%",
- "translations": {
- "name": {
- "en": "Discount 50%",
- "de": "Rabatte 50%"
}, - "description": {
- "en": "Special discount with a whopping 50%",
- "de": "Sonderrabatte mit ganzem 50%"
}
}, - "validFrom": "2021-04-26T00:00:00+02:00",
- "validUntil": "2021-07-26T00:00:00+02:00",
- "links": {
}
}Delete an existing coupon
| projectID required | string ID of the project |
| couponID required | string ID of a coupon |
| If-Match required | string The ETag of the resource. If the provided ETag does not match the current ETag of the resource, the request will fail with a 412 Precondition Failed error. Asterisk is supported as wildcard. |
{- "error": {
- "type": "string",
- "message": "string"
}
}Upload a new image
| projectID required | string ID of the project |
| file | string <binary> |
{- "ref": "gs://images.snabble.io/project-123/coupons/204cb6b1054699c7c3d2539ae7d783e67fabf38e-example.png"
}