# Get Batch Instructions GET https://api.prolific.com/api/v1/data-collection/batches/{batch_id}/instructions Get the instructions for an AI Task Builder batch Reference: https://beta-docs.prolific.com/api-reference/ai-task-builder/get-task-builder-instructions ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get Batch Instructions version: endpoint_aiTaskBuilder.GetTaskBuilderInstructions paths: /api/v1/data-collection/batches/{batch_id}/instructions: get: operationId: get-task-builder-instructions summary: Get Batch Instructions description: Get the instructions for an AI Task Builder batch tags: - - subpackage_aiTaskBuilder parameters: - name: batch_id in: path description: Batch ID required: true schema: type: string - name: Authorization in: header description: Header authentication of the form `undefined ` required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: >- #/components/schemas/AI Task Builder_GetTaskBuilderInstructions_Response_200 '400': description: Error content: {} components: schemas: AiTaskBuilderMultipleChoiceInstructionType: type: string enum: - value: multiple_choice AiTaskBuilderMultipleChoiceInstructionOptionsItemsValue: oneOf: - type: string - type: number format: double - type: boolean AiTaskBuilderMultipleChoiceInstructionOptionsItems: type: object properties: label: type: string description: Display text shown to participants value: $ref: >- #/components/schemas/AiTaskBuilderMultipleChoiceInstructionOptionsItemsValue description: Value returned in responses required: - label - value AITaskBuilderMultipleChoiceInstruction: type: object properties: id: type: string format: uuid created_at: type: string format: date-time type: $ref: '#/components/schemas/AiTaskBuilderMultipleChoiceInstructionType' batch_id: type: string created_by: type: string description: type: string description: The question or prompt displayed to participants helper_text: type: string description: Additional guidance text displayed below the question placeholder_text_input: type: string description: Placeholder text displayed in the input field answer_limit: type: integer description: >- Number of options that can be selected. Use 1 for single-select, -1 for unlimited, or any number up to the total options. disable_dropdown: type: boolean default: false description: >- When true, always renders checkbox/radio elements instead of a dropdown select, regardless of option count. By default, a dropdown is used when there are 5 or more options. options: type: array items: $ref: >- #/components/schemas/AiTaskBuilderMultipleChoiceInstructionOptionsItems required: - id - created_at - type - batch_id - created_by - description - answer_limit - options AiTaskBuilderFreeTextInputInstructionType: type: string enum: - value: free_text AITaskBuilderFreeTextInputInstruction: type: object properties: id: type: string format: uuid created_at: type: string format: date-time type: $ref: '#/components/schemas/AiTaskBuilderFreeTextInputInstructionType' batch_id: type: string created_by: type: string description: type: string description: The question or prompt displayed to participants helper_text: type: string description: Additional guidance text displayed below the question placeholder_text_input: type: string description: Placeholder text displayed in the input field required: - id - created_at - type - batch_id - created_by - description AiTaskBuilderMultipleChoiceWithFreeTextInstructionType: type: string enum: - value: multiple_choice_with_free_text AiTaskBuilderMultipleChoiceWithFreeTextInstructionOptionsItemsValue: oneOf: - type: string - type: number format: double - type: boolean AiTaskBuilderMultipleChoiceWithFreeTextInstructionOptionsItems: type: object properties: label: type: string description: Display text shown to participants value: $ref: >- #/components/schemas/AiTaskBuilderMultipleChoiceWithFreeTextInstructionOptionsItemsValue description: Value returned in responses heading: type: string description: Section heading that groups this option required: - label - value - heading AITaskBuilderMultipleChoiceWithFreeTextInstruction: type: object properties: id: type: string format: uuid created_at: type: string format: date-time type: $ref: >- #/components/schemas/AiTaskBuilderMultipleChoiceWithFreeTextInstructionType batch_id: type: string created_by: type: string description: type: string description: The question or prompt displayed to participants helper_text: type: string description: Additional guidance text displayed below the question placeholder_text_input: type: string description: Placeholder text displayed in the input field answer_limit: type: integer description: >- Number of options that can be selected. Use 1 for single-select, -1 for unlimited, or any number up to the total options. disable_dropdown: type: boolean default: false description: >- When true, always renders checkbox/radio elements instead of a dropdown select, regardless of option count. By default, a dropdown is used when there are 5 or more options. options: type: array items: $ref: >- #/components/schemas/AiTaskBuilderMultipleChoiceWithFreeTextInstructionOptionsItems required: - id - created_at - type - batch_id - created_by - description - answer_limit - options AiTaskBuilderFileUploadInstructionType: type: string enum: - value: file_upload AITaskBuilderFileUploadInstruction: type: object properties: id: type: string format: uuid created_at: type: string format: date-time type: $ref: '#/components/schemas/AiTaskBuilderFileUploadInstructionType' batch_id: type: string created_by: type: string description: type: string description: The prompt describing what to upload helper_text: type: string description: Additional guidance text displayed below the question placeholder_text_input: type: string description: Placeholder text displayed in the input field required: - id - created_at - type - batch_id - created_by - description AITaskBuilderInstruction: oneOf: - $ref: '#/components/schemas/AITaskBuilderMultipleChoiceInstruction' - $ref: '#/components/schemas/AITaskBuilderFreeTextInputInstruction' - $ref: >- #/components/schemas/AITaskBuilderMultipleChoiceWithFreeTextInstruction - $ref: '#/components/schemas/AITaskBuilderFileUploadInstruction' ApiV1DataCollectionBatchesBatchIdInstructionsGetResponsesContentApplicationJsonSchemaMeta: type: object properties: count: type: integer description: Total number of instructions AI Task Builder_GetTaskBuilderInstructions_Response_200: type: object properties: results: type: array items: $ref: '#/components/schemas/AITaskBuilderInstruction' meta: $ref: >- #/components/schemas/ApiV1DataCollectionBatchesBatchIdInstructionsGetResponsesContentApplicationJsonSchemaMeta ``` ## SDK Code Examples ```python import requests url = "https://api.prolific.com/api/v1/data-collection/batches/batch_id/instructions" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.prolific.com/api/v1/data-collection/batches/batch_id/instructions'; const options = {method: 'GET', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.prolific.com/api/v1/data-collection/batches/batch_id/instructions" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.prolific.com/api/v1/data-collection/batches/batch_id/instructions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java HttpResponse response = Unirest.get("https://api.prolific.com/api/v1/data-collection/batches/batch_id/instructions") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://api.prolific.com/api/v1/data-collection/batches/batch_id/instructions', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp var client = new RestClient("https://api.prolific.com/api/v1/data-collection/batches/batch_id/instructions"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/data-collection/batches/batch_id/instructions")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```