API Function: user_productions

The user_productions function retrieves all productions that are active for the user and for which they have access.

The user's access level will affect how the API can interact with records in a production. There are two key access levels: data_view and data_entry. A user might also have department limitations on their data_entry.

Example JSON request for this function:

{
    "action": "user_productions", // string
    "user": "api@greenlit.org.nz", // email string
    "production": "", // empty as not required
    "key":"", // empty as not required
    "records": {}, // empty as not required
    "data": {} // empty as not required
}

Example JSON response for this function:

{
    "status": "success",
    "error": "",
    "data": [
        {
            "iid": "1",
            "title": "Example Production",
            "year": "2023",
            "production_company": "Company Name",
            "production_type": "1", // see lookups
            "status": "0", // see lookups
            "data_view": "1", // able to view all records
            "data_entry": "1", // able to edit records (subject to department limits)
            "only_departments" : [], // array of department ids if restricted
        }, 
        // ... more in productions
    ],
    "actions": [],
    "lookups": {
        "production_type": {
            "1": "Feature Film",
            // .. more production types
        },
        "status": [
            "active", // index 0
            "archived",  // index 1
            "complete"  // index 2
        ]
    }
}

No luck what you're looking for?

Let us know details about your question. We'll get back to you!