Getting Started

Base Url

api.packagex.app/v4/

Header

Key: x-api-key
Value: Api key provided by PackageX team.

Scan API

Endpoint

POST

/scan

Description

This endpoint is used to extract the information from a given image

Content-Type

application/json

Sample Input Response

{
  "mailroom_id": "1",
  "call_type": "scan",
  "barcode": {
    "frames": [
      [
        {
          "type": "",
          "payload": "420100186364"
        }
      ]
    ]
  },
  "image": "/9j/4AAQSkZJRgABAQAASABIAAD/4QCMRXhpZgAATU0AKgAAAA...(shortened)"
}

Query Parameters

The following parameters are accepted in the body of the request in a json format

Parameter

mailroom_id

Type

String

Required

Yes

Description

The mailroom id used for scanning.

Parameter

image

Type

String

Required

Yes

Description

base64 encoded JPEG image for parsing. This parameter only requires the base64 encoded string of the image.

Parameter

call_type

Type

String

Required

Yes

Description

This identifies different type of call for extraction, at the moment only "scan" call_type is supported.

Parameter

barcode

Type

JSON

Required

Yes

Description

User has the option to pass the barcode along with image if they have a barcode scanner in place.

Parameter

platform

Type

String

Required

No

Description

(Optional) Platform where the scan was initiated.

Parameter

blurr_value

Type

String

Required

No

Description

(Optional) Blur Value for filtering out scans.

Response Example

{
  "body": {
    "output": {
      "scan_output": {
        "data": {
          "businesses_found": [],
          "suggestions": [],
          "members_found": [],
          "non_members_found": [],
          "sender_found": []
        },
        "address": {
          "sender_address": {},
          "receiver_address": {}
        },
        "courier_info": {
          "miscellaneous": {
            "food_delivey_flag": false,
            "legal_document_flag": false,
            "pay_stubs_flag": false,
            "confidential_flag": false,
            "fragile_flag": false,
            "oversize_flag": false,
            "time_sensitive_flag": false,
            "return_to_sender_flag": false
          },
          "dynamic_labels": [],
          "courier_name": "",
          "tracking_no": "",
          "weight_info": "",
          "tracking_from_barcode": false,
          "courier_from_barcode": false,
          "tracking_from_ocr": false,
          "courier_from_ocr": false,
          "barcode_present": false
        }
      },
      "success": ""
    },
    "mailroom_id": 1,
    "status": 200,
    "message": ""
  },
  "statusCode": 200
}