patch-api2-dashboard-offers-qc

Update Qualification Criteria (QC)

Allows a business to update one or more qualification criteria. The same validations as those in the Create Qualification Criteria API will apply. You can bulk update a maximum of 20 qualification criteria per API call. If the request input contains more than 20 QC, only the first 20 are created, and the remaining are ignored.

For more information, see Offers Ingestion Management

PATCH Requests: Partial Updates and Nested Object Replacements

PATCH requests allow you to update specific parameters of a QC object without affecting others. You only need to include the parameters you want to modify. For example, you can update only the percentage_of_processed_amount parameter in a QC object.

When updating a nested object (e.g., line_item_filters, item_qualifiers, receipt_qualifiers, aggregator_grouping_attributes), the entire nested object is replaced with the valid values provided in the request. Invalid values are ignored.

Additional rules when updating nested objects:

  • If all provided values are invalid, the existing values remain unchanged.
  • If an empty nested object is provided, the existing values are deleted.
  • If the nested object or any of its parameters is omitted, existing values remain unaffected.

To call this API, the offers ingestion option must be enabled for the business on the Punchh platform. Contact your Punchh representative to update this Punchh platform configuration.

For more information on QC settings, see the Qualification Criteria article on the Support Portal.

Note: To view the Punchh product documentation on the Punchh Support Portal, you must log in to a Punchh platform production environment. If you already have access to a production environment, follow the instructions here to access the Punchh Support Portal.

Headers
  • Accept
    Type: string

    Set this header to application/json

  • Content-Type
    Type: string

    Set this header to application/json

  • Authorization
    Type: string
    required

    Bearer token for admin authorization, who is making a call on behalf of the customer. Send the API key in the following format: "Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE".

Body
application/json
  • data
    Type: array object[]
    required

    A list of qualification criteria (QC) that need to be created

Responses
  • 200
    Type: object
    • results
      Type: array object[]

      List of responses indicating if the entity is created or not

  • 401
    Type: object
    • error
      Type: string
  • 403
    Type: object
    • error
      Type: string
patch/api2/dashboard/offers/qc
{
  "results": [
    {
      "external_id": "string",
      "success": true,
      "errors": [
        "string"
      ],
      "warnings": {
        "line_item_filters": [
          {
            "message": "string",
            "item": {
              "line_item_selector_id": "string",
              " processing_method": "string",
              "quantity": 1
            }
          }
        ],
        "item_qualifiers": [
          {
            "message": "string",
            "item": {
              "line_item_selector_id": "string",
              "expression_type": "string",
              "net_value": 1
            }
          }
        ],
        "receipt_qualifiers": [
          {
            "message": "string",
            "item": {
              "attribute": "string",
              "operator": "string",
              "value": "string"
            }
          }
        ],
        "qualifying_expressions_operator": [
          {
            "message": "string",
            "item": {
              "qualifying_expressions_operator": "string"
            }
          }
        ],
        "item_filter_expressions_operator": [
          {
            "message": "string",
            "item": {
              "item_filter_expressions_operator": "string"
            }
          }
        ],
        "discount_evaluation_strategy": [
          {
            "message": "string",
            "item": {
              "discount_evaluation_strategy": "string"
            }
          }
        ]
      }
    }
  ]
}