---
title: FSSAI Extraction API
slug: api-marketplace/fssai-extraction-api
createdAt: 2024-01-16T12:23:34.708Z
---

## Introduction

This API allows users to extract information from FSSAI doc through images. The API accepts an image URL containing FSSAI document. The API returns a JSON response with the extracted information in a result object including License Number, Business Operator name, address and other pertinent information.





***

## API details

### Endpoint

:::CodeblockTabs
Production Environment

```jsx
POST https://api-preproduction.signzy.app/api/v3/extraction/fssai
```
:::

:::CodeblockTabs
Production Environment

```jsx
POST https://api.signzy.app/api/v3/extraction/fssai
```
:::

***

### Request headers&#x20;

| **Name**      | **Value**        | **Required** | **Description**                                                                                            |
| ------------- | ---------------- | ------------ | ---------------------------------------------------------------------------------------------------------- |
| Content-Type  | application/json | Mandatory    | The type of content that the request body contains.                                                        |
| Authorization | XXXXXXXXXXXXXXX  | Mandatory    | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |

***

### Request body parameters

| **Parameter** | **Data type** | **Description**                                                                                                        | **Required** |
| ------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------ |
| file          | String        | A URL of the image. <br />Acceptable image format TIFF/TIF, JPEG/JPG, PNG, PDF(maximum 2 pages) containing NREGA card. | Mandatory    |

```json
{
    "file": "https://preproduction-persist.signzy.tech/api/files/40281535/download/xxxxxxxxxxxxxxxx.jpeg"
}
```

***

### Code samples

:::CodeblockTabs
```curl
curl --location 'https://api.signzy.app/api/v3/extraction/fssai' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Token>' \
--data '{
    "file": "https://preproduction-persist.signzy.tech/api/files/40281535/download/xxxxxxxxxxxxxxxx.jpeg"
}'
```

```nodejs
import http.client
import json

conn = http.client.HTTPSConnection("api.signzy.app")
payload = json.dumps({
  "imgurl": "https://preproduction-persist.signzy.tech/api/files/40281535/download/xxxxxxxxxxxxxxxx.jpeg"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<Token>'
}
conn.request("POST", "/api/v3/extraction/fssai", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

```python
import requests
import json

url = "https://api.signzy.app/api/v3/extraction/fssai"

payload = json.dumps({
  "imgurl": "https://preproduction-persist.signzy.tech/api/files/40281535/download/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.jpeg"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<AuthKey>'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api.signzy.app/api/v3/extraction/fssai"
  method := "POST"

  payload := strings.NewReader(`{
    "imgurl": "https://preproduction-persist.signzy.tech/api/files/40281535/download/xxxxxxxxxxxxxxxx.jpeg"
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "<Token>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
:::

***

### Response body parameters

| Parameter                        | Data Type | Description                                                          |
| -------------------------------- | --------- | -------------------------------------------------------------------- |
| result                           | Object    | Contains the result of the task.                                     |
| result.licenseNumber             | String    | The license number of the individual mentioned for the food license. |
| result.businessName              | String    | Business name mentioned in food license.                             |
| result.businessNature            | String    | Business  nature mentioned.                                          |
| result.operatorAddress           | String    | Operator Address mentioned.                                          |
| result.licenseCategory           | String    | The category of the license as specified in the food license.        |
| result.authorizedPremisesAddress | String    | Authorized Premises mentioned in food license.                       |
| result.issueDate                 | String    | The date on which the license was issued.                            |
| result.validFrom                 | String    | The start date of the license validity period.                       |
| result.validTill                 | String    | The end date of the license validity period.                         |

### Response body parameters

:::CodeblockTabs
200

```json
{
    "result": {
        "licenseNumber": "237***1000772",
        "businessName": "M/S VI** DO** DHABA",
        "businessNature": "Restaurants",
        "operatorAddress": "SPITUK, LEH, SPITUK, Leh, Leh, Ladakh-194101",
        "licenseCategory": "NA",
        "authorizedPremisesAddress": "SPITUK, LEH, SPITUK, Leh, Leh, Ladakh 194101",
        "issueDate": "03/08/2024",
        "validFrom": "03/08/2024",
        "validTill": "02/08/2029"
    }
}
```

422

```json
{
    "error": {
        "status": 422,
        "msg": "Unable to download file",
        "responseCode": "fail"
    }
}
```

401

```json
// When API key is not passed
{
    "message": "No API key found in request"
}

// when wrong API Key is passed
{
    "message": "Invalid authentication credentials"
}
```

409

```json
{
    "error": {
        "reason": "Error From upstream",
        "status": 409,
        "type": "Conflict",
        "message": "Upstream Down",
        "statusCode": 409,
        "name": "error"
    }
}

```

404

```json
{
    "error": {
        "statusCode": 404,
        "status": 404,
        "message": "Not Found"
    }
}
```

400

```json
//when empty file provided
{
    "error": {
        "statusCode": 400,
        "status": "Bad Request",
        "message": "FIle should not be an empty string"
    }
}
```
:::

***

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!

