Introduction There is emerging evidence for stratified glucose-lowering responses to certain oral medications for type 2 diabetes (T2D) by individual characteristics. The objective of this study was to test whether glycaemic response to representative treatments of dipeptidyl peptidase-4 inhibitors (vildagliptin) and thiazolidinediones (pioglitazone) varies according to ethnicity, gender, baseline obesity, triglyceride level or genetic variation. Methods This is a multicentre, two-period, two-treatment, open-label, randomised cross-over trial of vildagliptin and pioglitazone as second-line or third-line therapy in patients with T2D who have suboptimal glycaemic control on metformin and/or sulfonylurea therapy. It is conducted in New Zealand with a target of 300 patients (40% with Ma ori or Pacific ancestry) eligible if aged ≥18 and ≤80 years, with T2D for more than 1 year, on stable doses of metformin and/or sulfonylurea for at least 3 months, with HbA1c between 59 and 110 mmol/mol inclusive. Participants are assigned to complete 4 months of vildagliptin 50 mg per day or pioglitazone 30 mg per day, followed by 4 months of the other medications in randomly allocated sequences. Participant characteristics, including ethnicity, obesity, lipid profile and candidate genotypes are collected at baseline. Primary outcome variable is on treatment HbA1c. Secondary outcomes include weight change, frequency of side effects and patient preference. Ethics and dissemination Ethical approval of the trial has been obtained from the New Zealand Health and Disability Ethics Committee (18/STH/242). The trial commenced in February 2019 and recruitment is expected to be completed by March 2020. Results will be reported in articles submitted to peer-reviewed journals, as well as in presentations at national and international meetings. Trial registration number ACTRN12618001907235.