Batch Automation for Phone Number Verification


 

 

Availability

Batch Automation is available globally. Currently, batch jobs of up to 5 million records can processed.

Overview

You use the Batch Automation Service to perform batch file processing using Syniverse APIs. This simplifies the processing of large amounts of data; you can process millions of records with only three API requests and, because all interactions are API-driven, Batch Automation can be fully automated. The use of REST APIs also simplifies the integration and automation process.

Service Description

While performing a single phone number lookup is valuable, there may be times when you have a set or group of numbers you need to process. Adding Batch Automation, Media Storage Service and Event Manager services to Phone Number Verification enables easier processing of large sets of phone numbers. With batch processing you send a file containing multiple phone numbers and the system performs a lookup for each number within the file as a batch process and stores the results in a file you can download. Event Manager notifies you when the file is ready for download..

Features Overview

  • Easy Scheduling of Batch Jobs: Instead of making a million API calls to process a million phone numbers, you create a single input file, upload the file to Media Storage Service, and then schedule the processing of these phone numbers with a single API call, using a predefined job template.
  • Automatic Batch Job Processing: The Batch Automation Service queues and automatically processes a job. It collects all the batch job outputs, including both results and errors, and stores them for you to download.
  • Status Notifications: The Event Manager Service notifies you when a batch job is complete and the results are available for download.
  • Simple Retrieval of Results: You download the results with a single API call to the Media Storage Service.

Resource Overview

  • Input and Output File Formats: File format details can be retrieved using the Layout Resource.
  • Uploading Input Files: Input files can be uploaded via the Content Resource in the Media Storage Service. Visit the resources page for further details
  • Supported Jobs: A list of available jobs can be queried using the Job Resource. Jobs are predefined to simplify setup. The job defines the input and output file layouts, as well as the Syniverse services and APIs to be used to process the input data
  • Schedule Jobs: Batch jobs are scheduled using the Schedule Resource. When scheduling a batch job, the input file ID and job ID need to be specified. A list of available job IDs can be returned using the Job Resource.
  • Job Status Notifications: You can be notified when a job is complete and receive other event notifications during batch processing. To receive notifications, you needs to create a subscription for the ABA-Messages Topic in the Event Manager Service. This is created once and then performed for all subsequent batch jobs
  • Job Execution, Status, and Results: Scheduled jobs are executed by the Batch Automation service. You can query the status of a job using the Execution Resource. The query also returns statistics for the job execution. When a job is complete, the Execution Resource can be queried to obtain the final job execution details and the URL to download the output files
  • Downloading Output Files: Output files, including separate files of the results and errors, can be downloaded from Media Storage Service using the URL provided by the Execution Resource.

Example Code

Example python code showing how to use the Batch Automation with Media Storage and the Phone Number Verification API is available on GitHub.

Access

Before a customer can use the Batch Automation API they need to subscribe to the service by going to Service Offerings -> ABA -> Subscriptions and clicking Subscribe.

The customer will also need to enable Media Storage in the Applications -> Account -> Settings -> Account & APIs -> ABA and selecting ON.

Batch Automation Service is used in conjunction with:

  • Media Storage Service: Upload and download files for batch processing
  • Event Manager Service: Delivery of batch processing notifications and phone number event change notifications
  • Phone Number Verification API: Batch processing for phone number verification

 

 

Example Code


Batch Automation example code is available in Python, Java and cURL.

Batch Monitoring Phone Numbers using Java

If you are familiar with Python you can quickly get up and running using our code samples. GitHub includes Python code showing how to use the Batch Automation with Media Storage and the Phone Number Verification API. Access the examples on GitHub here.

This includes:

  • Looking up detailed information for a list of phone numbers, available here
  • Monitoring a list of phone numbers by subscribing to notifications for lifecycle events such as porting or disconnection, available here.

The example code includes everything you need to upload, create and run a batch job and then download the results. Besides the example code, the repository also includes example input files and results. Once downloaded, the only code changes needed are to add your access token and your delivery configuration if you want to subscribe to notifications.

Batch Monitoring Phone Numbers using Java

If you prefer Java then you may want to use our Java code sample. This is available on Github here.

Batch Monitoring Phone Numbers using cURL

You can use cURL statements to create, schedule and download the results for the batch job; however it is easier use a script or code, due to the number of steps involved. Examples cURL statements are provided below.

Example CURL Statements

These example cURL statements can be used to:

  • Run a Phone Verification Scrub Job to look up phone number details
  • Run Phone Verification Monitor Job to subscribe to notifications
  • Run Phone Number Verification Unsubscribe Job to unsubscribe from notifications
API Example Call
schedule, Scrub
curl -X POST -H "Authorization: Bearer [YOUR ACCESS TOKEN]" -H "Content-Type: application/json"  -d '{
    "schedule": {
    "jobId": "[YOUR JOB ID]",
    "name": "NIS Scrub",
    "inputFileId": "[UNIQUE FILE ID]",
    "fileRetentionDays": 30,
    "scheduleRetentionDays": 30,
    "outputFileNamingExpression": "NIS-Scrub-output.txt",
    "outputFileFolder": "Test",
    "outputFileTag": "Test Tag",
    "jobRuntimeContext": {}
    }
}' "https://api.syniverse.com/aba/v1/schedules"
		
schedule, Monitor
curl -X POST -H "Authorization: Bearer [YOUR ACCESS TOKEN]" -H "Content-Type: application/json" -d '{
    "schedule": {
        "jobId": "NIS-Monitor-v2",
        "name": "Subscribe",
        "inputFileId": "[UNIQUE FILE ID]",
        "outputFileNamingExpression": "",
        "outputFileFolder": "",
        "outputFileTag": "",
        "fileRetentionDays": 30,
        "scheduleRetentionDays": 30,
        "jobRuntimeContext": {
            "subscribeevents": "all",
            "subscribedestinationid": "[ID FOR EVENT MANAGER SUBSCRIPTION]"
        }
 }
}' "https://api.syniverse.com/aba/v1/schedules"
		
schedule. Unsubscribe
curl -X POST -H "Authorization: Bearer [YOUR ACCESS TOKEN]" -H "Content-Type: application/json" -d '{
    "schedule": {
        "jobId": "NIS-Unsubscribe-v2",
        "name": "Unsubscribe",
        "inputFileId": "[UNIQUE FILE ID]",
        "outputFileNamingExpression": "",
        "outputFileFolder": "",
        "outputFileTag": "",
        "fileRetentionDays": 30,
        "scheduleRetentionDays": 30,
        "jobRuntimeContext": {}
 }
}' "https://api.syniverse.com/aba/v1/schedules"