# Batch Verification Launch

POST https://api.apexverify.com/v1/batch/{batch_uuid}

Start batch verification if the batch status reached ready_for_verification.

Reference: https://documentation.apexverify.com/api-reference/apex-verify-api/batch/post-v-1-batch-batch-uuid-post

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: openapi
  version: 1.0.0
paths:
  /v1/batch/{batch_uuid}:
    post:
      operationId: post-v-1-batch-batch-uuid-post
      summary: Batch Verification Launch
      description: >-
        Start batch verification if the batch status reached
        ready_for_verification.
      tags:
        - subpackage_batch
      parameters:
        - name: batch_uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: X-API-Key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchPostModelResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '402':
          description: Please reload your credits to proceed with the verification...
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentRequiredResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
servers:
  - url: https://api.apexverify.com
components:
  schemas:
    BatchPostRequestStatusResponseEnum:
      type: string
      enum:
        - ok
        - error
        - not_ready_for_verification
        - verification_already_ongoing
        - verification_already_done
      title: BatchPostRequestStatusResponseEnum
    BatchPostModelResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/BatchPostRequestStatusResponseEnum'
      required:
        - status
      title: BatchPostModelResponse
    BadRequestResponse:
      type: object
      properties:
        message:
          type: string
          default: Bad Request
      title: BadRequestResponse
    UnauthorizedResponse:
      type: object
      properties:
        message:
          type: string
          default: Unauthorized
      title: UnauthorizedResponse
    PaymentRequiredResponse:
      type: object
      properties:
        message:
          type: string
          default: >-
            Payment Required. Please reload your credits to proceed with the
            verification...
      title: PaymentRequiredResponse
    ForbiddenResponse:
      type: object
      properties:
        message:
          type: string
          default: Forbidden
      title: ForbiddenResponse
    NotFoundResponse:
      type: object
      properties:
        message:
          type: string
          default: Not Found
      title: NotFoundResponse
    ValidationErrorLocItems:
      oneOf:
        - type: string
        - type: integer
      title: ValidationErrorLocItems
    ValidationErrorCtx:
      type: object
      properties: {}
      title: ValidationErrorCtx
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
        input:
          description: Any type
        ctx:
          $ref: '#/components/schemas/ValidationErrorCtx'
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      title: HTTPValidationError
    TooManyRequestsResponse:
      type: object
      properties:
        message:
          type: string
          default: Too Many Requests
      title: TooManyRequestsResponse
    InternalServerErrorResponse:
      type: object
      properties:
        message:
          type: string
          default: >-
            Internal Server Error. Please contact support at
            contact@apexverify.com...
      title: InternalServerErrorResponse
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

```

## SDK Code Examples

```python
import requests

url = "https://api.apexverify.com/v1/batch/batch_uuid"

headers = {"X-API-Key": "<apiKey>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.apexverify.com/v1/batch/batch_uuid';
const options = {method: 'POST', headers: {'X-API-Key': '<apiKey>'}};

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.apexverify.com/v1/batch/batch_uuid"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("X-API-Key", "<apiKey>")

	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.apexverify.com/v1/batch/batch_uuid")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.apexverify.com/v1/batch/batch_uuid")
  .header("X-API-Key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.apexverify.com/v1/batch/batch_uuid', [
  'headers' => [
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.apexverify.com/v1/batch/batch_uuid");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-Key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.apexverify.com/v1/batch/batch_uuid")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```