Partner Webhooks

Webhooks related to partner data

Partner webhooks are fired whenever partners are created or updated.


Partner Created

This is only fired when a partner is created at a top level. Creating a new partner user for an existing partner for example will not cause this webhook to fire.

The payload included in the Partner Created webhook is the same one you would receive by making a request to the Find Affiliate By ID endpoint using both the users and billing relationships.

The payload of the webhook, when using the POST option will look like so :

Payload

{
    "network_affiliate_id": 20138,
    "network_id": 1,
    "name": "Partner Name",
    "account_status": "active",
    "network_employee_id": 10,
    "internal_notes": "Internal Notes",
    "has_notifications": true,
    "network_traffic_source_id": 38,
    "account_executive_id": 39,
    "adress_id": 83932,
    "default_currency_id": "USD",
    "is_contact_address_enabled": true,
    "enable_media_cost_tracking_links": false,
    "time_created": 1609459200,
    "time_saved": 1609459200,
    "relationship": {
        "labels": {
            "total": 2,
            "entries": [
                "label1",
                "label2"
            ]
        },
        "users": {
            "total": 1,
            "entries": [
                {
                    "network_affiliate_user_id": 342,
                    "network_id": 1,
                    "network_affiliate_id": 20138,
                    "first_name": "Partner",
                    "last_name": "User",
                    "email": "partner-user@example.com",
                    "title": "title",
                    "work_phone": "1234567890",
                    "cell_phone": "1234567890",
                    "instant_messaging_id": 0,
                    "instant_messaging_identifier": "",
                    "language_id": 1,
                    "timezone_id": 80,
                    "currency_id": "USD",
                    "account_status": "active",
                    "time_created": 1609459200,
                    "time_saved": 1609459200
                }
            ]
        },
        "account_manager": {
            "first_name": "John",
            "last_name": "Doe",
            "email": "john.doe@example.com",
            "work_phone": "",
            "cell_phone": "",
            "instant_messaging_id": 0,
            "instant_messaging_identifier": ""
        },
        "account_executive": {
            "network_employee_id": 39,
            "network_id": 1,
            "first_name": "Jane",
            "last_name": "Doe",
            "full_name": "Jane Doe",
            "account_status": "inactive"
        },
        "contact_address": {
            "address_id": 83932,
            "network_id": 1,
            "address_1": "4115 Saint-Laurent",
            "address_2": "Suite 202",
            "city": "Montreal",
            "region_code": "QC",
            "country_id": 36,
            "country_code": "CA",
            "zip_postal_code": "H2W 1Y8"
        },
        "encoded_value": "25M87N33",
        "billing": {
            "network_id": 1,
            "network_affiliate_id": 20138,
            "billing_frequency": "bimonthly",
            "payment_type": "paypal",
            "invoice_amount_threshold": 100,
            "tax_id": "TAX_ID_123",
            "is_invoice_creation_auto": true,
            "auto_invoice_start_date": "2020-07-01 00:00:00",
            "default_invoice_is_hidden": false,
            "invoice_generation_days_delay": 10,
            "default_payment_terms": 30,
            "relationship": {
                "paypal_billing": {
                    "paypal_reception_method": "email",
                    "reception_identifier": "partner-user@example.com"
                },
                "bimonthly": {
                    "day_of_month_one": 4,
                    "day_of_month_two": 17
                }
            }
        },
        "network_affiliate_tier_id": 6,
        "ios_app_sources": {
            "total": 0,
            "entries": []
        }
    },
    "referrer_id": 36
}

Partner Updated

This is only fired when the partner itself is updated. For example it will be fired when :

  • The account manager of the partner is changed to a different one
  • The partner’s address is updated
  • The partner’s billing settings are modified

It will not be fired when :

  • Visibility is granted to the partner over a private offer
  • A new postback is created for the partner
  • A new partner user is created

The payload included in the Partner Updated webhook is the same one you would receive by making a request to the Find Affiliate By ID endpoint using both the users and billing relationships.

The payload of the webhook, when using the POST option will look like so :

Payload

{
    "network_affiliate_id": 20138,
    "network_id": 1,
    "name": "Updated Partner Name",
    "account_status": "active",
    "network_employee_id": 10,
    "internal_notes": "Internal Notes",
    "has_notifications": true,
    "network_traffic_source_id": 38,
    "account_executive_id": 39,
    "adress_id": 83932,
    "default_currency_id": "USD",
    "is_contact_address_enabled": true,
    "enable_media_cost_tracking_links": false,
    "time_created": 1609459200,
    "time_saved": 1609459300,
    "relationship": {
        "labels": {
            "total": 2,
            "entries": [
                "label1",
                "label2"
            ]
        },
        "users": {
            "total": 1,
            "entries": [
                {
                    "network_affiliate_user_id": 342,
                    "network_id": 1,
                    "network_affiliate_id": 20138,
                    "first_name": "Partner",
                    "last_name": "User",
                    "email": "partner-user@example.com",
                    "title": "title",
                    "work_phone": "1234567890",
                    "cell_phone": "1234567890",
                    "instant_messaging_id": 0,
                    "instant_messaging_identifier": "",
                    "language_id": 1,
                    "timezone_id": 80,
                    "currency_id": "USD",
                    "account_status": "active",
                    "time_created": 1609459200,
                    "time_saved": 1609459245
                }
            ]
        },
        "account_manager": {
            "first_name": "John",
            "last_name": "Doe",
            "email": "john.doe@example.com",
            "work_phone": "",
            "cell_phone": "",
            "instant_messaging_id": 0,
            "instant_messaging_identifier": ""
        },
        "account_executive": {
            "network_employee_id": 39,
            "network_id": 1,
            "first_name": "Jane",
            "last_name": "Doe",
            "full_name": "Jane Doe",
            "account_status": "inactive"
        },
        "contact_address": {
            "address_id": 83932,
            "network_id": 1,
            "address_1": "4115 Saint-Laurent",
            "address_2": "Suite 202",
            "city": "Montreal",
            "region_code": "QC",
            "country_id": 36,
            "country_code": "CA",
            "zip_postal_code": "H2W 1Y8"
        },
        "encoded_value": "25M87N33",
        "billing": {
            "network_id": 1,
            "network_affiliate_id": 20138,
            "billing_frequency": "bimonthly",
            "payment_type": "paypal",
            "invoice_amount_threshold": 100,
            "tax_id": "TAX_ID_123",
            "is_invoice_creation_auto": true,
            "auto_invoice_start_date": "2020-07-01 00:00:00",
            "default_invoice_is_hidden": false,
            "invoice_generation_days_delay": 10,
            "default_payment_terms": 30,
            "relationship": {
                "paypal_billing": {
                    "paypal_reception_method": "email",
                    "reception_identifier": "partner-user@example.com"
                },
                "bimonthly": {
                    "day_of_month_one": 4,
                    "day_of_month_two": 17
                }
            }
        },
        "network_affiliate_tier_id": 6,
        "ios_app_sources": {
            "total": 0,
            "entries": []
        }
    },
    "referrer_id": 36
}