Documentation
Getting Started
Base Url
api.packagex.app/v4/
Header
Key: x-api-key
Value: Api key provided by PackageX team.
Scan API
Endpoint
/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
mailroom_id
String
Yes
The mailroom id used for scanning.
image
String
Yes
base64 encoded JPEG image for parsing. This parameter only requires the base64 encoded string of the image.
call_type
String
Yes
This identifies different type of call for extraction, at the moment only "scan" call_type is supported.
barcode
JSON
Yes
User has the option to pass the barcode along with image if they have a barcode scanner in place.
platform
String
No
(Optional) Platform where the scan was initiated.
blurr_value
String
No
(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 }