VARIATION CODES UPDATE

VTpass will send your webhook an update when a particular service has updated or new variation codes. Variation codes can change when service providers introduce new or modify their current variation properties.

The new variation codes and the report is being sent to this webhook.

EXPECTED REQUEST DATA FOR VARIATION CODES UPDATE
{
  "type": "variations-update",
  "response_description": "VARIATION CODE UPDATE",
  "serviceID": "smile-direct",
  "service": "Smile Payment",
  "summary": {
    "added_variation_codes": 0,
    "updated_variation_codes": 38,
    "removed_variation_codes": 23
  },
  "data": {
    "response_description": "000",
    "content": {
      "ServiceName": "Smile Payment",
      "serviceID": "smile-direct",
      "convinience_fee": "N0.00",
      "variations": [
        {
          "variation_code": "516",
          "name": "SmileVoice ONLY 65 for 30days - 510 Naira",
          "variation_amount": "510.00",
          "fixedPrice": "Yes"
        },
        {
          "variation_code": "413",
          "name": "2GB MidNite for 7days - 1,020 Naira",
          "variation_amount": "1020.00",
          "fixedPrice": "Yes"
        },
        ...
      ],
      "varations": [
        {
          "variation_code": "516",
          "name": "SmileVoice ONLY 65 for 30days - 510 Naira",
          "variation_amount": "510.00",
          "fixedPrice": "Yes"
        },
        {
          "variation_code": "413",
          "name": "2GB MidNite for 7days - 1,020 Naira",
          "variation_amount": "1020.00",
          "fixedPrice": "Yes"
        },
        ...
      ]
    }
  },
  "actionRequired": {
    "added": {
      "total": 0,
      "variation_codes": []
    },
    "updated": {
      "total": 38,
      "variation_codes": [
        "624",
        "625",
        "626",
        ...
      ]
    },
    "removed": {
      "total": 23,
      "variation_codes": [
        "545",
        "522",
        "546",
        ...
      ]
    }
  },
  "datetime": "2020-06-11 23-31-15"
}
FIELDS M/O TYPE DESCRIPTION
type M string The definition of the callback. In this case, it is variations-code-update
serviceID M string This is the service ID for the product. In this case, smile-direct.
summary M object This contains a summarised report of the number of new variation codes added [summary][added_variation_codes], the number of variation codes updated [summary][updated_variation_codes] and the number of variation codes removed [summary][removed_variation_codes]
data M object This contains a response similar to that of the endpoint for variation codes on VTpass. The content is an object and the updated variation codes will be in [data][content][ variations ] which is an array of objects representing the current variation codes of the service
actionRequired M object This contains 3 specific properties [actionRequired] [added] which contains a report of total numbers of variation code added [actionRequired] [added] [total] and the variation codes [actionRequired] [added] [variation_codes], the second property contains the total numbers of variation code modified [actionRequired] [updated] [total] and the variation codes [actionRequired] [updated] [variation_codes] and the last property contains the total numbers of variation code removed [actionRequired] [removed] [total] and the variation codes [actionRequired] [removed] [variation_codes]