Affiliate Codes

These resources show the affiliate codes for the active subscription of the current customer.

GET /affiliates

List all codes for active affiliates associated with the current customer

Request

No parameters required (besides your API key of course).

Responses

Success

{
    "status": "ok",
    "affiliates": [
        {
            "id": 25,
            "name": "UFC Presales",
            "codes": [
                "test-code-1",
                "test-code-2"
            ],
            "code_instructions": "<p>Do not share your code with anyone.</p>\n",

        },
        {
            "id": 26,
            "name": "UFC.tv PPV",
            "codes": [
                "ppv-test-code"
            ]
            "code_instructions": null,
        }
    ]
}

Failure: Customer has no active subscription

{
    "status": "ok",
    "affiliates": []
}

GET /affiliates/{id}

List of all codes associated with a specific affiliate

Request

Name Type Description
id url segment [Required] The affiliate ID of the desired codes

Responses

Success: After GET request to /affiliates/25*

* Assuming "UFC Presales" has id = 25

{
    "status": "ok",
    "affiliates": [
        {
            "id": 25,
            "name": "UFC Presales",
            "codes": [
                "test-code-1",
                "test-code-2"
            ],
            "code_instructions": : "<p>Do not share your code with anyone.</p>\n"
        }
    ]
}

Failure: Not logged in, customer has no active subscription, or invalid affiliate id

{
    "status": "ok",
    "affiliates": []
}