Logo
OpenText Developer Cloud public resources API Documentation

Read BarCodes Service

POST {{baseUrl}}/session/services/readbarcodes

The Read BarCodes Real-Time Service will provide barcode extraction processing.

Service Properties

  • Env - Metadata environment identifier. Value is one of D, T or P. Default value is P.

  • BarcodeTypes - Required String. Comma separated list of available barcodes. List of barcodes types:

    • Addon2, Addon5, AustralianPost, BCDMATRIX, Codabar, Code25Datalogic, Code25IATA, Code25Industrial, Code25Interleaved, Code25Invert, Code25Matrix, Code32, Code39, Code93, DataMatrix, EAN13, EAN8,IntelligentMail, PDF417, Postnet, QRCode, RoyalPost, Type128, UCC128, UPCA, UPCE
  • Characters - Number. Exact number of characters to search for in the barcode text. Valid values range from 0 to 100.

  • Decode - Boolean. If true, then it decodes the results into readable strings; otherwise, if false (the default), then it will not decode into readable strings.

  • MinHeight - Number. Minimum height of barcode. Valid values range from 0 (default) to 1000.

  • Mode - String. Barcode detection modes let you switch between normal and enhanced detection types. If omitted, defaults to Normal. Valid values:

    • Enhanced - Provides better results by performing additional image preprocessing, but takes longer to complete,
    • Normal - Enables quick barcodes detection.
  • Orientation - String. Specifies the orientation of the barcodes detection. If omitted, then it defaults to HorizontalVertical. Valid values are:

    • Horizontal,
    • HorizontalVertical,
    • HorizontalVerticalDiagonal,
    • Vertical.
  • ScanDistance - Number. Specifies the scan distance (in pixels) between line sweeps. Useful when searching for 1D type barcodes. Reducing the value improves detection of barcodes which are short relative to their height. Valid values are 1 to 10. If omitted, defaults to 5.

  • UseChecksum - Boolean. A value that is an indication of whether the checksums are used. If omitted, then it defaults to false.

  • UseRegion - String. A region to select for barcode detection in order to improve the barcode detection process. It defaults to empty (not used).

Number of Request Items

This Real-Time Service supports one or more items.

Values Per Request Item

No values are necessary or used.

Files Per Request Item

There can only be one file per request item object. It can either be an embedded file or a reference to a file ID previously posted to the Files Resource. The File Type property for the file is ignored for this service.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Content-Type
string




RESPONSES

status OK

{ "returnStatus": { "status": 200, "code": "OK0000", "message": "", "server": "WS-S9d85aaf9fd134654be88edc11906fd53IS" }, "licenseUsedPercent": 0, "id": "ReqCPIMGPRO_3K3_0021033", "serviceName": "readbarcodes", "executionMilliSeconds": 229, "licensePagesUsed": 0, "licensePagesUsed2": 0, "resultItems": [ { "nodeId": 1, "errorCode": "", "errorMessage": "", "values": [ { "name": "Barcode0_Type", "value": "Codabar" }, { "name": "Barcode0_Text", "value": "12345678" }, { "name": "Barcode0_X", "value": 880 }, { "name": "Barcode0_Y", "value": 340 }, { "name": "Barcode0_Width", "value": 358 }, { "name": "Barcode0_Height", "value": 134 }, { "name": "Barcode0_Orientation", "value": "0" }, { "name": "Barcode0_Conf", &quo
Curl
curl -X POST 'https://capture.ot2.opentext.com/cp-rest/v2/session/services/readbarcodes' -H 'Content-Type: application/hal+json' -d '{"serviceProps":[{"name":"Env","value":"D"},{"name":"Mode","value":"Normal"},{"name":"Orientation","value":"Horizontal"},{"name":"Decode","value":true},{"name":"Characters","value":"8"},{"name":"MinHeight","value":"0"},{"name":"ScanDistance","value":"5"},{"name":"BarcodeTypes","value":""},{"name":"UseChecksum","value":false},{"name":"UseRegion","value":""}],"requestItems":[{"nodeId":1,"values":null,"files":[{"name":"Barcodes","value":"F_9b0772629acd46369a18571d630bfb29DAT","contentType":"application/octet-stream","fileType":"TIF"}]}]}'

ENDPOINTS