External Promotions API (1.1.2)

Download OpenAPI specification:Download

API for an external coupon promotion program that is called by the enfore platform.

Coupons

Operations related to the promotion program coupons. Includes operations to verify coupons and mark coupons as used.

Determine the status of an external promotion coupon

path Parameters
org-id
required
string

ID of the organization whose data is being accessed.

query Parameters
coupon_code
required
string

The Coupon code to check.

language
string <bcp47>

Language tag that specifies the language in that localized results should be returned, if possible. See https://www.w3.org/TR/ltli/#dfn-language-tag

customer_card_identifier
string

Identifier retrieved by customer verification

Responses

200

The result of the verification.

400

Invalid parameters were sent by the client

403

Credentials missing or not sufficient

404

Resource(s) not found or invalid identifier

get /org/{org-id}/external-promotions/coupons/verify
/org/{org-id}/external-promotions/coupons/verify

Response samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "status": "UNKNOWN_IDENTIFIER",
  • "coupon_description": "string",
  • "identifier": "string",
  • "discount":
    {
    },
  • "@type": "CouponVerificationSuccess"
}

Reports coupons as used.

path Parameters
org-id
required
string

ID of the organization whose data is being accessed.

Request Body schema: application/json
used_coupons
Array of strings

List of used coupons

language
required
string <bcp47> [ 1 .. 256 ] characters

Language tag that specifies the language in that localized results should be returned, if possible. See https://www.w3.org/TR/ltli/#dfn-language-tag

customer_card_identifier
string <= 256 characters

Identifier retrieved by customer verification

Responses

200

The result of reporting the coupons.

400

Invalid parameters were sent by the client

403

Credentials missing or not sufficient

404

Resource(s) not found or invalid identifier

post /org/{org-id}/external-promotions/coupons/mark-used/
/org/{org-id}/external-promotions/coupons/mark-used/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "used_coupons":
    [
    ],
  • "language": "string",
  • "customer_card_identifier": "string"
}

Response samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "@type": "CouponReportSuccess"
}

Evaluation

Operations related to evaluation of the coupon benefits.

Calculate discounts for a coupon based on the specified basket

path Parameters
org-id
required
string

ID of the organization whose data is being accessed.

Request Body schema: application/json
basket
required
object (Basket)
language
required
string <bcp47> [ 1 .. 256 ] characters

Language tag that specifies the language in that localized results should be returned, if possible. See https://www.w3.org/TR/ltli/#dfn-language-tag

selected_coupons
Array of strings

Optional list of coupons that have been presented by the customer

customer_identifier
string <= 256 characters

Identifier retrieved by customer verification

Responses

200

The result of the calculation.

400

Invalid parameters were sent by the client

403

Credentials missing or not sufficient

404

Resource(s) not found or invalid identifier

post /org/{org-id}/external-promotions/coupons/calculate-discounts/
/org/{org-id}/external-promotions/coupons/calculate-discounts/

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "basket":
    {
    },
  • "language": "string",
  • "selected_coupons":
    [
    ],
  • "customer_identifier": "string"
}

Response samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "discounts":
    [
    ],
  • "additional_discounts":
    [
    ],
  • "@type": "CouponDiscountCalculationSuccess"
}

Subscription

Operations related to subscriptions of customers to an external promotion

Verifies a customer that has registered with the service provider of the promotion. A customer verification can and will be done only if customer identifiers have been specified in the EPP configuration. If the configuration of the EPP does not enable customer verification, enfore will not make this call and the service does not need to implement it.

path Parameters
org-id
required
string

ID of the organization whose data is being accessed.

query Parameters
customer_identifier
required
string

The identifier to check.

language
string <bcp47>

Language tag that specifies the language in that localized results should be returned, if possible. See https://www.w3.org/TR/ltli/#dfn-language-tag

Responses

200

The result of the verification.

400

Invalid parameters were sent by the client

403

Credentials missing or not sufficient

404

Resource(s) not found or invalid identifier

get /org/{org-id}/external-promotions/customer/verify
/org/{org-id}/external-promotions/customer/verify

Response samples

Content type
application/json
Example
Copy
Expand all Collapse all
{
  • "status": "UNKNOWN",
  • "contact":
    {
    },
  • "@type": "CustomerVerificationSuccess"
}