openapi: 3.0.0 info: title: Reward Points Service version: '' description: |- Collect reward points and exchange them for coupons. contact: email: documentation@emporix.com paths: '/reward-points/summaryBatch': get: description: | Retrieves a detailed summary of added and redeemed reward points for all customers of a given tenant. The tenant name is selected based on the access token. **Note:** Only employees are authorized to perform this action. operationId: GET-reward-points-retrieve-rewards-summary tags: - Reward Points Management responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/customerSummaryBatchOut' examples: Summary response example: value: - customerId: '20242913' activePoints: 2000 summary: addedPointsList: - id: 1c32ce73-8765-42a7-92af-ff370a0a59d6 reference-id: description: points: 2000 createdAt: '2023-05-11T18:32:18.591+00:00' allPointsAfterCreation: 2000 usedPoints: 140 validUntil: '2023-11-11T12:00:50.406+00:00' usedWith: - d85c0570-1d51-4611-bf2f-c67452384626 - b5085a36-a5f0-450d-a011-9f92902f3900 - id: b9919f33-3a0b-4fd7-acdb-217edd4fc110 reference-id: null description: Chargeback - redeemed voucher could not be created. points: 50 createdAt: '2023-05-11T18:32:38.564+00:00' allPointsAfterCreation: 2000 usedPoints: 0 validUntil: '2026-05-11T18:32:38.564+00:00' usedWith: [] - id: 42cd0799-9965-4983-8548-e7ad79160572 reference-id: null description: Chargeback - redeemed voucher could not be created. points: 90 createdAt: '2023-05-11T18:32:50.981+00:00' allPointsAfterCreation: 2000 usedPoints: 0 validUntil: '2026-05-11T18:32:50.981+00:00' usedWith: [] redeemedPointsList: - id: d85c0570-1d51-4611-bf2f-c67452384626 description: test desc points: 50 createdAt: '2023-05-11T18:32:38.501+00:00' allPointsAfterCreation: 1950 - id: b5085a36-a5f0-450d-a011-9f92902f3900 description: For 90 points you can have a voucher for 10 euros generated. You can also pass this voucher on to friends and acquaintances. points: 90 createdAt: '2023-05-11T18:32:50.946+00:00' allPointsAfterCreation: 1910 '401': $ref: '#/components/responses/trait_unauthorized_401' '403': $ref: '#/components/responses/trait_forbidden_403' '500': $ref: '#/components/responses/trait_internal_500' parameters: [] security: - OAuth2: - rewardspoints.rewardpoints_view summary: Retrieving reward points of all customers '/reward-points/customer/{customerId}': get: description: | Fetches the number of reward points for a particular customer of a given tenant. The tenant name is retrieved from the access token. **Note:** Only employees are authorized to perform this action. operationId: GET-reward-points-fetch-customer-reward-points tags: - Reward Points Management responses: '200': description: '' content: application/json: schema: title: pointsOut type: integer examples: Customer points: value: 2000 '400': $ref: '#/components/responses/trait_badRequest_400' '403': $ref: '#/components/responses/trait_forbidden_403' '500': $ref: '#/components/responses/trait_internal_500' parameters: [] security: - OAuth2: - rewardspoints.rewardpoints_view summary: Retrieving reward points of a customer post: description: | Creates a new reward points entry for a particular customer of a given tenant. The tenant name is retrieved from the access token. operationId: POST-reward-points-create-customer-reward-entry tags: - Reward Points Management responses: '200': description: '' '400': $ref: '#/components/responses/trait_badRequest_400' '401': $ref: '#/components/responses/trait_unauthorized_401' '403': $ref: '#/components/responses/trait_forbidden_403' '409': $ref: '#/components/responses/trait_conflict_409' '500': $ref: '#/components/responses/trait_internal_500' parameters: - $ref: '#/components/parameters/siteCode' requestBody: content: application/json: schema: $ref: '#/components/schemas/newCustomerIn' examples: New entry example: value: customerId: C4289081720 startPoints: id: 12345fee-0b83-48aa-95dc-11e3dcf84aaa reference-id: '123456' description: points added points: 20 createdAt: '2019-08-24T14:15:22Z' allPointsAfterCreation: 20 usedPoints: 5 validUntil: '2019-08-24T14:15:22Z' usedWith: - 5237bcac-c548-4e49-8626-03dab65376d6 description: '' security: - OAuth2: - rewardspoints.rewardpoints_manage summary: Creating a new reward points entry for a customer delete: description: |- Deletes a reward points entry of a specified customer for a given tenant. The tenant name is retrieved from the access token. operationId: DELETE-reward-points-remove-customer-reward-entry tags: - Reward Points Management responses: '200': description: '' '401': $ref: '#/components/responses/trait_unauthorized_401' '403': $ref: '#/components/responses/trait_forbidden_403' '500': $ref: '#/components/responses/trait_internal_500' parameters: [] security: - OAuth2: - rewardspoints.rewardpoints_manage summary: Deleting reward points of a customer parameters: - $ref: '#/components/parameters/customerId' '/reward-points/customer/{customerId}/summary': get: description: | Retrieves a detailed summary of added and redeemed reward points of a single specified customer for a given tenant. The tenant name is retrieved from the access token. **Note:** Only employees are authorized to perform this action. operationId: GET-reward-points-retrieve-customer-reward-summary tags: - Reward Points Management responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/pointsSummaryOut' examples: Customer summary sample: value: customerId: '123' activePoints: 1153 summary: addedPointsList: - id: zzpscd12uimlmybtthb reference-id: B7011746 description: Bonuspunkte für Bestellung B7011746 points: 209 createdAt: '2020-09-03T09:45:02.248+00:00' allPointsAfterCreation: 209 usedPoints: 209 validUntil: '2023-09-02T22:00:00.000+00:00' usedWith: - e7522b99-2448-44b5-8f68-8bffcc207d18 - id: c9joe623gl4obochkrmy8i reference-id: B7011745 description: Bonuspunkte für Bestellung B7011745 points: 209 createdAt: '2020-09-03T09:45:02.318+00:00' allPointsAfterCreation: 418 usedPoints: 209 validUntil: '2023-09-02T22:00:00.000+00:00' usedWith: - e7522b99-2448-44b5-8f68-8bffcc207d18 redeemedPointsList: - id: e7522b99-2448-44b5-8f68-8bffcc207d18 description: Für 600 Punkte können Sie sich einen Gutschein über 5 Euro generieren lassen. Diesen Gutschein können Sie auch an Freunde und Bekannte weitergeben. points: 600 createdAt: '2020-09-03T12:44:22.747+00:00' allPointsAfterCreation: 2953 '401': $ref: '#/components/responses/trait_unauthorized_401' '403': $ref: '#/components/responses/trait_forbidden_403' '404': $ref: '#/components/responses/trait_notFound_404' '500': $ref: '#/components/responses/trait_internal_500' parameters: [] security: - OAuth2: - rewardspoints.rewardpoints_view summary: Retrieving a reward points summary for a single customer parameters: - $ref: '#/components/parameters/customerId' '/reward-points/customer/{customerId}/addPoints': post: description: | Adds reward points to a specific customer's account for a given tenant. The tenant name is retrieved from the access token. **Note:** Only employees are authorized to perform this action. operationId: POST-reward-points-add-customer-reward-points tags: - Reward Points Management responses: '201': description: '' '400': $ref: '#/components/responses/trait_badRequest_400' '401': $ref: '#/components/responses/trait_unauthorized_401' '403': $ref: '#/components/responses/trait_forbidden_403' '500': $ref: '#/components/responses/trait_internal_500' parameters: - $ref: '#/components/parameters/siteCode' requestBody: content: application/json: schema: $ref: '#/components/schemas/addedPoints' examples: Add points: value: id: 12345fee-0b83-48aa-95dc-11e3dcf84aaa reference-id: '123456' description: points added points: 123 createdAt: '2023-10-24T14:15:22Z' allPointsAfterCreation: 56778 usedPoints: 5 validUntil: '2029-08-24T14:15:22Z' usedWith: - 5237bcac-c548-4e49-8626-03dab65376d6 security: - OAuth2: - rewardspoints.rewardpoints_manage summary: Adding reward points for a customer parameters: - $ref: '#/components/parameters/customerId' '/reward-points/customer/{customerId}/redeemPoints': post: description: | Redeems reward points for a specified customer for a given tenant without generating a coupon. The tenant name is retrieved from the access token. **Note:** Only employees are authorized to perform this action. operationId: POST-reward-points-redeem-customer-points tags: - Reward Points Management responses: '201': description: '' '400': $ref: '#/components/responses/trait_badRequest_400' '401': $ref: '#/components/responses/trait_unauthorized_401' '403': $ref: '#/components/responses/trait_forbidden_403' '500': $ref: '#/components/responses/trait_internal_500' parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/redeemedPoints' examples: Redeem Options: value: description: points redeemed points: 50 description: '' security: - OAuth2: - rewardspoints.rewardpoints_manage summary: Redeeming reward points of a customer parameters: - description: Unique identifier of a customer in: path name: customerId required: true schema: type: string '/reward-points/public/customer': get: description: |- Fetches the number of reward points of a currently signed-in customer. **Note:** This public API endpoint is accessible to all customers. operationId: GET-reward-points-fetch-logged-customer-points tags: - Signed-In Customer Reward Points responses: '200': description: '' content: application/json: schema: title: pointsOut type: integer examples: 'Number of points ': value: 1153 '401': $ref: '#/components/responses/trait_unauthorized_401' '403': $ref: '#/components/responses/trait_forbidden_403' '500': $ref: '#/components/responses/trait_internal_500' parameters: [] security: - CustomerAccessToken: [] summary: Retrieving reward points of a signed-in customer '/reward-points/public/customer/summary': get: description: |- Retrieves a detailed summary of added and redeemed reward points of a signed-in customer. **Note:** This public API endpoint is accessible to all customers. operationId: GET-reward-points-retrieve-logged-customer-reward-summary tags: - Signed-In Customer Reward Points responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/pointsSummaryOut' examples: Customer Summary: value: customerId: '123' activePoints: 1153 summary: addedPointsList: - id: zzpscd12uimlmybtthb reference-id: B7011746 description: Bonuspunkte für Bestellung B7011746 points: 209 createdAt: '2020-09-03T09:45:02.248+00:00' allPointsAfterCreation: 209 usedPoints: 209 validUntil: '2023-09-02T22:00:00.000+00:00' usedWith: - e7522b99-2448-44b5-8f68-8bffcc207d18 - id: c9joe623gl4obochkrmy8i reference-id: B7011745 description: Bonuspunkte für Bestellung B7011745 points: 209 createdAt: '2020-09-03T09:45:02.318+00:00' allPointsAfterCreation: 418 usedPoints: 209 validUntil: '2023-09-02T22:00:00.000+00:00' usedWith: - e7522b99-2448-44b5-8f68-8bffcc207d18 redeemedPointsList: - id: e7522b99-2448-44b5-8f68-8bffcc207d18 description: Für 600 Punkte können Sie sich einen Gutschein über 5 Euro generieren lassen. Diesen Gutschein können Sie auch an Freunde und Bekannte weitergeben. points: 600 createdAt: '2020-09-03T12:44:22.747+00:00' allPointsAfterCreation: 2953 '401': $ref: '#/components/responses/trait_unauthorized_401' '403': $ref: '#/components/responses/trait_forbidden_403' '500': $ref: '#/components/responses/trait_internal_500' parameters: [] security: - CustomerAccessToken: [] summary: Retrieving a reward points summary of a signed-in customer '/reward-points/{tenant}/redeemOptions': post: description: |- Sets up a reward points redemption option that contains instructions for transforming these points into a coupon. Customers are required to choose this option to convert the reward points and create a coupon based on the pre-established rules. **Note**: Only employees have the authority to configure the redemption options. operationId: POST-reward-points-create-redeem-options tags: - Redeem Options Management responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/redeemOptions' examples: response: value: - points: 30 type: coupon name: persönlicher 20 Euro Gutschein description: Ein persönlicher Gutschein zum einlösen auf Lieferladen.de (nur gültig im Lieferladen.de Stuttgart Shop) '400': $ref: '#/components/responses/trait_badRequest_400' '401': $ref: '#/components/responses/trait_unauthorized_401' '403': $ref: '#/components/responses/trait_forbidden_403' '500': $ref: '#/components/responses/trait_internal_500' parameters: - name: tenant in: path required: true schema: type: string description: Tenant name. requestBody: content: application/json: schema: $ref: '#/components/schemas/redeemOption' examples: Redeem option creation sample: value: type: coupon name: 10 Euro Gutschein description: Für 90 Punkte können Sie sich einen Gutschein über 10 Euro generieren lassen. Diesen Gutschein können Sie auch an Freunde und Bekannte weitergeben. points: 90 coupon: name: Gutschein über 10 Euro (eingelöste Bonuspunkte) description: Gutschein über 10 Euro aus 1000 Bonuspunkte discountType: ABSOLUTE discountAbsolute: amount: 10 currency: EUR allowAnonymous: true maxRedemptions: 1 status: VALID security: - CustomerAccessToken: [] - OAuth2: - rewardspoints.rewardpoints_manage summary: Creating redemption options get: summary: Retrieving redemption options operationId: GET-reward-points-list-redeem-options tags: - Redeem Options Management responses: '200': description: Returns all configured reward points redemption options content: application/json: schema: type: array items: $ref: '#/components/schemas/redeemOption' examples: Sample response: value: - id: 5f905280df6b3b0013b6c541 type: coupon name: 10 Euro Gutschein description: Für 90 Punkte können Sie sich einen Gutschein über 10 Euro generieren lassen. Diesen Gutschein können Sie auch an Freunde und Bekannte weitergeben. points: 90 coupon: name: Gutschein über 10 Euro (eingelöste Bonuspunkte) description: Gutschein über 10 Euro aus 1000 Bonuspunkte discountType: ABSOLUTE discountAbsolute: amount: 10 currency: EUR allowAnonymous: true maxRedemptions: 1 status: VALID metadata: version: 1 createdAt: '2023-07-25T13:28:25.960Z' modifiedAt: '2023-07-25T13:28:25.960Z' '401': $ref: '#/components/responses/trait_unauthorized_401' '403': $ref: '#/components/responses/trait_forbidden_403' '500': $ref: '#/components/responses/trait_internal_500' parameters: - name: tenant in: path required: true schema: type: string description: Tenant name. description: |- Retrieves all available reward points redemption options configured for customers to use. **Note:** This public API endpoint is accessible to all customers. '/reward-points/{tenant}/redeemOptions/{redeemOptionId}': delete: description: |- Deletes a reward points redemption option for a given tenant. **Note**: Only employees have the authority to delete the redemption options. operationId: DELETE-reward-points-remove-redeem-option tags: - Redeem Options Management responses: '204': description: Deletes given redeem option by id '401': $ref: '#/components/responses/trait_unauthorized_401' '403': $ref: '#/components/responses/trait_forbidden_403' '500': $ref: '#/components/responses/trait_internal_500' parameters: - name: redeemOptionId in: path required: true schema: type: string description: Unique identifier of a redeem option. - name: tenant in: path required: true schema: type: string description: Tenant name. security: - CustomerAccessToken: [] summary: Deleting redemption options put: description: |- Updates a reward points redemption option for a given tenant. **Note**: Only employees have the authority to update the redemption options. operationId: PUT-reward-points-update-redeem-option tags: - Redeem Options Management responses: '200': description: Updates given redeem option by id '400': $ref: '#/components/responses/trait_badRequest_400' '401': $ref: '#/components/responses/trait_unauthorized_401' '403': $ref: '#/components/responses/trait_forbidden_403' '409': description: The resource requested for update has changed. content: application/json: schema: example: status: 409 message: RedeemOption not Updated details: message: The resource that was requested for update with id = 64b7a has changed. Please retry your request with valid version '500': $ref: '#/components/responses/trait_internal_500' parameters: - name: redeemOptionId in: path required: true schema: type: string description: Unique identifier of a redeem option. - name: tenant in: path required: true schema: type: string description: Tenant name. requestBody: content: application/json: schema: $ref: '#/components/schemas/redeemOption' examples: Redeem option update sample: value: type: coupon name: 10 Euro Gutschein description: Für 90 Punkte können Sie sich einen Gutschein über 10 Euro generieren lassen. Diesen Gutschein können Sie auch an Freunde und Bekannte weitergeben. points: 90 coupon: name: Gutschein über 10 Euro (eingelöste Bonuspunkte) description: Gutschein über 10 Euro aus 1000 Bonuspunkte discountType: ABSOLUTE discountAbsolute: amount: 10 currency: EUR allowAnonymous: true maxRedemptions: 1 status: VALID metadata: version: 1 security: - CustomerAccessToken: [] - OAuth2: - rewardspoints.rewardpoints_manage summary: Updating redemption options '/reward-points/public/customer/redeem': post: description: |- Gets the logged-in customer's reward points, swaps them for a coupon code by using the given redemption option ID, and returns a coupon code. **Note:** This public API endpoint is accessible to all customers and is meant to be used on the storefront. operationId: POST-reward-points-redeem-logged-customer-reward-points-coupon tags: - Signed-In Customer Reward Points responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/redeemCouponOut' examples: response: value: code: LLS-232394 '400': $ref: '#/components/responses/trait_badRequest_400' '403': $ref: '#/components/responses/trait_forbidden_403' '404': $ref: '#/components/responses/trait_notFound_404' '500': $ref: '#/components/responses/trait_internal_500' parameters: - $ref: '#/components/parameters/siteCode' requestBody: content: application/json: schema: title: redeemOptionIn example: id: 575937654bf757001d8496c9 type: object properties: id: type: string description: The ID of the redeem option used to convert points into a coupon. required: - id examples: Redeem points: value: id: 575937654bf757001d8496c9 security: - CustomerAccessToken: [] summary: Redeeming a logged-in customer's reward points for a coupon code servers: - url: 'https://api.emporix.io' components: parameters: siteCode: name: siteCode in: query required: false schema: type: string default: main description: 'Site code, defined when a site is created.' customerId: name: customerId in: path required: true schema: type: string description: 'Unique identifier of a customer, generated when the customer is created through the Customer Service.' responses: trait_badRequest_400: description: Request syntactically incorrect. Details of the error are included in the response payload. content: application/json: schema: title: error description: Schema for API specified errors. example: status: 400 message: 'There are validation problems, see details section for more information' moreInfo: '' type: validation_violation details: - field: tenant message: size must be between 3 and 16 type: invalid_header type: object properties: status: minimum: 100 maximum: 599 description: 'Original HTTP error code, should be consistent with the response HTTP code' type: integer title: pattern: '[a-z]+[a-z_]*[a-z]+' description: 'Classification of the error type in the lower case with underscore format, for example: `validation_failure`' type: string type: description: Type of the error. type: string instance: type: string description: Resource link detail: description: Detailed information about the error. type: string examples: Bad request: value: type: 'about:blank' title: Bad Request status: 400 detail: Invalid request content. instance: /customer/61443563/addPoints trait_forbidden_403: description: | Given authorization scopes are not sufficient and do not match required scopes. content: application/json: schema: title: error description: Schema for API specified errors. type: object properties: code: minimum: 100 maximum: 599 description: 'Original HTTP error code, should be consistent with the response HTTP code' type: integer status: pattern: '[a-z]+[a-z_]*[a-z]+' description: 'Classification of the error type in the lower case with underscore format, for example: `validation_failure`' type: string message: description: Descriptive error message for debugging type: string details: description: List of problems causing this error type: array items: title: errorDetail description: Schema for a specific error cause type: string required: - code - status examples: Forbidden: value: code: 403 status: Forbidden message: Scope validation failed details: - 'Missing required scopes ''[rewardspoints.rewardpoints_view, saasag.rewardpoints_view]''' trait_conflict_409: description: '' content: application/json: schema: title: error description: Schema for API specified errors. example: status: 400 message: 'There are validation problems, see details section for more information' moreInfo: '' type: validation_violation details: - field: tenant message: size must be between 3 and 16 type: invalid_header type: object properties: status: minimum: 100 maximum: 599 description: 'Original HTTP error code, should be consistent with the response HTTP code' type: integer type: pattern: '[a-z]+[a-z_]*[a-z]+' description: 'Classification of the error type in the lower case with underscore format, for example: `validation_failure`' type: string message: description: Descriptive error message for debugging type: string moreInfo: type: string description: Documentation link details: description: List of problems causing this error type: array items: title: errorDetail description: Schema for a specific error cause type: object properties: field: description: 'A bean notation expression specifying the element in request data that causes the error, for example: `product.variants[3].name`. This field can be empty if the violation was not field-specific' type: string nullable: true type: pattern: '[a-z]+[a-z_]*[a-z]+' description: 'Classification of the error type with details, provided in the lower case with underscore format, for example: `missing_value`. This value must be always interpreted in context of the general error type.' type: string nullable: true message: description: Detailed descriptive error message for debugging type: string moreInfo: type: string description: Documentation link required: - type required: - status - type examples: Conflict: value: status: 409 type: application/json message: New Reward Point Entry not Created moreInfo: '' details: - field: null type: null message: Couldn't create a new reward point entry for the customer '20242913' moreInfo: '' trait_notFound_404: description: | Entity not found. content: application/json: schema: title: error description: Schema for API specified errors. type: object properties: type: description: 'Classification of the error type in the lower case with underscore format, for example: `validation_failure`' type: string status: description: 'Original HTTP error code, should be consistent with the response HTTP code' type: integer message: description: Descriptive error message for debugging type: string details: description: List of problems causing this error type: array items: title: errorDetail description: Schema for a specific error cause type: string examples: Not Found: value: type: resource_not_found status: 404 message: No reward points found for customer 202429132 trait_internal_500: description: Internal error content: application/json: schema: title: error description: Schema for API specified errors. type: object properties: timestamp: description: Timestamp when the error occurred. type: string status: description: 'Original HTTP error code, should be consistent with the response HTTP code' type: integer error: description: Descriptive error message for debugging type: string path: description: Path of a resource that caused the error. type: string examples: Internal error: value: timestamp: '2023-10-12T06:41:03.866+00:00' status: 500 error: Internal Server Error path: /customer/30010284222 trait_unauthorized_401: description: '' content: application/json: schema: type: object properties: fault: type: object properties: faultstring: type: string detail: type: object properties: errorcode: type: string examples: Unauthorized: value: fault: faultstring: Invalid access token detail: errorcode: oauth.v2.InvalidAccessToken schemas: customerSummaryBatchOut: title: Collection of Summaries type: array items: $ref: '#/components/schemas/pointsSummaryOut' pointsSummaryOut: title: pointsSummaryOut type: object properties: customerId: type: string description: Id of the customer to whom the points are assigned activePoints: type: integer description: Active points that can be redeemed summary: $ref: '#/components/schemas/customerSummary' addedPoints: title: addedPoints type: object properties: id: type: string reference-id: type: string description: Order Id for which the points were created nullable: true description: type: string description: Auto-generated description points: type: integer description: Number of points added in the operation createdAt: type: string format: date-time validUntil: format: date-time type: string description: The date until when the points can be redeemed allPointsAfterCreation: type: integer description: Number of points after creation usedPoints: type: integer description: Number of points already used usedWith: type: array items: type: string required: - points redeemedPoints: title: redeemedPoints type: object properties: id: type: string description: Identifier of the redeemed points description: type: string description: A comment for the redeem operation points: type: integer description: The amount of the redeemed points createdAt: type: string format: date-time description: Timestamp when the points were redeemed allPointsAfterCreation: type: integer description: Number of points after creation required: - points customerSummary: title: customerSummary type: object properties: addedPointsList: type: array items: $ref: '#/components/schemas/addedPoints' redeemedPointsList: type: array items: $ref: '#/components/schemas/redeemedPoints' required: - addedPointsList redeemOptions: title: redeemOptions type: array items: $ref: '#/components/schemas/redeemOption' redeemOption: title: redeemOption type: object properties: id: type: string description: ID of the redemption option to be used at reward points exchange type: type: string description: 'Option type, typically ''coupon''.' name: type: string description: Name of the redeem option that can be presented to customer description: type: string description: Description of the redeem option that can be presented to customer points: type: integer description: Points to deduct from customer's account at coupon creation coupon: $ref: '#/components/schemas/coupon' pointsAfterCoupon: type: integer metadata: type: object properties: version: type: integer description: Version of the redeem option createdAt: type: string description: Timestamp when the redeem option has been created. modifiedAt: type: string description: Timestamp when the redeem option has been modified. required: - type - name - points redeemCouponOut: title: CouponCode type: object properties: code: type: string description: Coupon code received after exchanging points coupon: title: Coupon API description: Coupons describe voucher-like commerce capabilities. type: object properties: code: description: 'Coupon code, for example: WINTER-SALE, 10OFF (read-only)' type: string name: description: Localized coupon name type: string description: description: Localized coupon description type: string discountType: description: '''PERCENT'' for relative values, ''ABSOLUTE'' for float values referring to a specific currency, ''FREE_SHIPPING'' for reducing the shipping cost to 0.' enum: - PERCENT - ABSOLUTE - FREE_SHIPPING type: string discountPercentage: minimum: 0 maximum: 100 description: 'Discount percentage within a range [0.00, 100.00]. Must be specified only if type is ''PERCENT''.' type: number discountAbsolute: title: Money Amount description: Must be specified only if type is 'ABSOLUTE' type: object properties: amount: default: 0 minimum: 0 description: Total amount in the specified currency. type: number currency: default: USD pattern: '^[a-zA-Z]{3}$' description: 'ISO 4217 currency code, e.g.: USD, EUR, CHF' type: string allowAnonymous: default: false description: Defines if the coupon can be redeemed by anonymous users type: boolean maxRedemptions: default: -1 description: Maximum number of redemptions; -1 designates 'unlimited' (seller-only) type: number maxRedemptionsPerCustomer: default: -1 description: Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users. type: number restrictions: $ref: '#/components/schemas/restrictions' issuedTo: description: Id of the customer who originally received the coupon (seller-only). type: string redemptionCount: description: 'The number of times a specific coupon has been redeemed. Read-only, set through server. (seller-only)' type: number status: description: 'Current status of the coupon (read-only). ''INACTIVE'': the coupon is only valid in the future; ''VALID'': can be used; ''EXPIRED'': the coupon validity period has expired; ''USED'': the maximum number of redemptions for the coupon has been reached.' enum: - INACTIVE - VALID - EXPIRED - USED type: string links: description: 'Hypermedia reference to coupon actions (read-only, customer-only)' type: array items: description: Hypermedia reference to a resource type: object properties: rel: description: Link relation type type: string title: description: Link title type: string href: description: Target URI of the link type: string type: description: Content type of the referenced resource type: string required: - rel - title - href - type deleted: description: Flag to mark a coupon as deleted (a.k.a. Soft delete). It is a read-only and seller-only attribute type: boolean required: - name - discountType newCustomerIn: type: object properties: customerId: type: string startPoints: $ref: '#/components/schemas/addedPoints' description: '' restrictions: title: Restrictions type: object properties: validFor: default: [] description: A list of identifiers of customers that can redeem the coupon. Cannot be specified for coupons which can be redeemed by anonymous users. type: array items: type: string validFrom: format: date-time type: string description: 'Must be provided in the ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. ''2015-01-31T23:59:59.999Z''' validUntil: format: date-time type: string description: 'Must be provided in the ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. ''2015-01-31T23:59:59.999Z''' minOrderValue: title: Money Amount description: Minimum order value which entitles the customer to redeem the coupon type: object properties: amount: default: 0 minimum: 0 description: Total amount in the specified currency type: number currency: default: USD pattern: '^[a-zA-Z]{3}$' description: 'ISO 4217 currency code, e.g.: USD, EUR, CHF' type: string securitySchemes: OAuth2: type: oauth2 flows: clientCredentials: tokenUrl: 'https://api.emporix.io/oauth/token' scopes: rewardspoints.rewardpoints_view: Nedeed to view reward points information rewardspoints.rewardpoints_manage: Needed to manage reward points CustomerAccessToken: type: http scheme: bearer security: - OAuth2: [] tags: - name: Redeem Options Management - name: Reward Points Management - name: Signed-In Customer Reward Points