AI Scoring API: File Status

The scoring filestatus API returns the file processing status for the file been submitted using sendfile API. Please refer to the C# example for details.

GET /V2/SCORING/FILESTATUS

API URL: https://bulkapi.zerobounce.net/v2/scoring/filestatus

URL Parameters

  • Parameter
    Required/Optional
    Description
  • api_key
    Required
    Your API Key, found in your account
  • file_id
    Required
    The returned file ID when calling scoring sendfile API

If you want to call the API from your browser to test it, all you have to do is to replace the API KEY with your key and the FILE ID with the returned file ID from scoring sendfile

File Status Code Samples

  • Visual Basic
  • C#
  • PHP
  • Java
  • Python
  • Swift
  • Objective C
  • Android Java
' File Status Sample in VB.netPublicClassFileStatus PublicPropertysuccess AsBooleanPublicPropertyfile_id AsStringPublicPropertyfile_name AsStringPublicPropertyupload_date AsStringPublicPropertyfile_status AsStringPublicPropertycomplete_percentage AsStringPublicPropertyreturn_url AsStringEndClassPrivateSharedSubFileStatusAPITest()DimapiKey AsString="replace with your api key here"DimfileID AsString="replace with the returned file ID when calling sendfile API"TryDimfileStatus AsFileStatus =FileStatusAsync(apiKey,fileID).Result Console.Write(JsonConvert.SerializeObject(fileStatus,Formatting.Indented))Catchex AsException Console.Write(ex.InnerException.Message)EndTryConsole.ReadKey()EndSubPublicSharedAsync FunctionFileStatusAsync(ByValapiKey AsString,ByValfileID AsString)AsTask(OfFileStatus)IfString.IsNullOrEmpty(apiKey)ThenThrowNewException("Error: apiKey is required")IfString.IsNullOrEmpty(fileID)ThenThrowNewException("Error: fileID is required")Dimuri AsUri =NewUri($"https://bulkapi.zerobounce.net/v2/scoring/filestatus?api_key={apiKey}&file_id={fileID}")Usingclient =NewHttpClient()Usingrequest =NewHttpRequestMessage(HttpMethod.Get,uri)Usingresponse =Await client.SendAsync(request).ConfigureAwait(False)Dimcontent =Await response.Content.ReadAsStringAsync()Ifresponse.IsSuccessStatusCode =FalseThenDimerrorAsString=$"StatusCode ={CInt(response.StatusCode)},Content ={content}" ThrowNewException(error)EndIfReturnJsonConvert.DeserializeObject(OfFileStatus)(content)EndUsingEndUsingEndUsingEndFunction
// File Status Sample in C#publicclassFileStatus{publicboolsuccess {get;set;}publicstringfile_id {get;set;}publicstringfile_name {get;set;}publicstringupload_date {get;set;}publicstringfile_status {get;set;}publicstringcomplete_percentage {get;set;}publicstringreturn_url {get;set;}}privatestaticvoidFileStatusAPITest(){stringapiKey ="replace with your api key here";stringfileID ="replace with the returned file ID when calling sendfile API";try{FileStatusfileStatus =FileStatusAsync(apiKey,fileID).Result;Console.Write(JsonConvert.SerializeObject(fileStatus,Formatting.Indented));}catch(Exceptionex){Console.Write(ex.InnerException.Message);}Console.ReadKey();}publicstaticasyncTask<FileStatus>FileStatusAsync(stringapiKey,stringfileID){if(string.IsNullOrEmpty(apiKey))thrownewException("Error: apiKey is required");if(string.IsNullOrEmpty(fileID))thrownewException("Error: fileID is required");Uriuri =newUri($"https://bulkapi.zerobounce.net/v2/scoring/filestatus?api_key={apiKey}&file_id={fileID}");using(varclient =newHttpClient())using(varrequest =newHttpRequestMessage(HttpMethod.Get,uri))using(varresponse =awaitclient.SendAsync(request).ConfigureAwait(false)){varcontent =awaitresponse.Content.ReadAsStringAsync();if(response.IsSuccessStatusCode ==false){varerror =$"StatusCode={(int)response.StatusCode}, Content={content}";thrownewException(error);}returnJsonConvert.DeserializeObject<FileStatus>(content);}}
<?php$curl=curl_init();curl_setopt_array($curl,array(CURLOPT_URL=>"https://bulkapi.zerobounce.net/v2/scoring/filestatus?api_key=replacewithyours&file_id=replacewithyours",CURLOPT_RETURNTRANSFER=>true,CURLOPT_ENCODING=>"",CURLOPT_MAXREDIRS=>10,CURLOPT_TIMEOUT=>30,CURLOPT_HTTP_VERSION=>CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST=>"GET",CURLOPT_POSTFIELDS=>"",CURLOPT_HTTPHEADER=>array("Postman-Token: 91504cea-f92f-46b0-97a4-338167072887","cache-control: no-cache"),));$response=curl_exec($curl);$err=curl_error($curl);curl_close($curl);if($err){echo"cURL Error #:".$err;}else{echo$response;}?>
OkHttpClientclient =newOkHttpClient();Requestrequest =newRequest.Builder().url("https://bulkapi.zerobounce.net/v2/scoring/filestatus?api_key=replacewithyours&file_id=replacewithyours").get().addHeader("cache-control","no-cache").addHeader("Postman-Token","7fffd7a4-b2fd-4e8b-ac85-4099411f27ce").build();Responseresponse =client.newCall(request).execute();
importhttp.client conn =http.client.HTTPConnection("bulkapi,zerobounce,net")payload =""headers ={'cache-control':"no-cache",'Postman-Token':"caa917fe-45ce-45ae-9456-2b039b999dcb"}conn.request("GET","v2,filestatus",payload,headers)res =conn.getresponse()data =res.read()print(data.decode("utf-8"))
// Please select VB or C# language for File Status Sampleimport Foundationletheaders =["cache-control":"no-cache","Postman-Token":"4f1b92e2-034f-4fa0-94d9-b097d768668a"]letrequest =NSMutableURLRequest(url:NSURL(string:"https://bulkapi.zerobounce.net/v2/scoring/filestatus?api_key=replacewithyours&file_id=replacewithyours")!asURL,cachePolicy:.useProtocolCachePolicy,timeoutInterval:10.0)request.httpMethod ="GET"request.allHTTPHeaderFields =headers letsession =URLSession.shared letdataTask =session.dataTask(with:request asURLRequest,completionHandler:{(data,response,error)->Voidinif(error !=nil){print(error)}else{lethttpResponse =response as?HTTPURLResponseprint(httpResponse)}})dataTask.resume()
#import<Foundation/Foundation.h>NSDictionary *headers =@{@"cache-control":@"no-cache",@"Postman-Token":@"5e9c24ae-b577-4e33-8748-83f14e151ae9"};NSMutableURLRequest *request =[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://bulkapi.zerobounce.net/v2/scoring/filestatus?api_key=replacewithyours&file_id=replacewithyours"]cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10.0];[request setHTTPMethod:@"GET"];[request setAllHTTPHeaderFields:headers];NSURLSession *session =[NSURLSession sharedSession];NSURLSessionDataTask *dataTask =[session dataTaskWithRequest:request completionHandler:^(NSData *data,NSURLResponse *response,NSError *error){if(error){NSLog(@"%@",error);}else{NSHTTPURLResponse *httpResponse =(NSHTTPURLResponse *)response;NSLog(@"%@",httpResponse);}}];[dataTask resume];
// N/A

Endpoint Response

Successful Response

{"success":true,"file_id":"aaaaaaaa-zzzz-xxxx-yyyy-5003727fffff","file_name":"Your file name.csv","upload_date":"10/20/2018 4:35:58 PM","file_status":"Complete","complete_percentage":"100%","return_url":"Your return URL if provided when calling sendfile API"}

Error Response

{"success":false,"message":"Error messages"}