Chilkat Online Tools

SQL Server / ShipEngine Walkthrough / Parse shipment information

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    -- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    -- Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    -- The following JSON is sent in the request body.

    -- {
    --   "text": "I need to ship a 17lb package that’s 36x12x24in. It’s going to Amanda Miller’s house at 525 Winchester Blvd in San Jose California. The zip code is 95128. It's really valuable, so insure it for $400 and require an adult signature please."
    -- }

    DECLARE @json int
    -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @json OUT

    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'text', 'I need to ship a 17lb package that’s 36x12x24in. It’s going to Amanda Miller’s house at 525 Winchester Blvd in San Jose California. The zip code is 95128. It''s really valuable, so insure it for $400 and require an adult signature please.'

    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'API-Key', '{{API_KEY}}'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Content-Type', 'application/json'

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'PostJson3', @resp OUT, 'https://api.shipengine.com/v1/shipments/recognize', 'application/json', @json
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @json
        RETURN
      END

    DECLARE @sbResponseBody int
    -- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody

    DECLARE @jResp int
    -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jResp OUT

    EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
    EXEC sp_OASetProperty @jResp, 'EmitCompact', 0


    PRINT 'Response Body:'
    EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT

    PRINT 'Response Status Code = ' + @respStatusCode
    IF @respStatusCode >= 400
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @resp

        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @json
        EXEC @hr = sp_OADestroy @sbResponseBody
        EXEC @hr = sp_OADestroy @jResp
        RETURN
      END
    EXEC @hr = sp_OADestroy @resp

    -- Sample JSON response:
    -- (Sample code for parsing the JSON response is shown below)

    -- {
    --   "score": 0.9604458751176728,
    --   "shipment": {
    --     "confirmation": "adult_signature",
    --     "ship_to": {
    --       "name": "Amanda Miller",
    --       "company_name": "Adult Signature",
    --       "address_line1": "525 Winchester Blvd",
    --       "city_locality": "San Jose",
    --       "state_province": "CA",
    --       "postal_code": "95128",
    --       "address_residential_indicator": "yes"
    --     },
    --     "packages": [
    --       {
    --         "weight": {
    --           "value": 17,
    --           "unit": "pound"
    --         },
    --         "dimensions": {
    --           "length": 36,
    --           "width": 12,
    --           "height": 24,
    --           "unit": "inch"
    --         },
    --         "insured_value": {
    --           "amount": 400,
    --           "currency": "USD"
    --         }
    --       }
    --     ]
    --   },
    --   "entities": [
    --     {
    --       "type": "weight",
    --       "score": 0.9805313966503588,
    --       "text": "17lb",
    --       "start_index": 17,
    --       "end_index": 20,
    --       "result": {
    --         "value": 17,
    --         "unit": "pound"
    --       }
    --     },
    --     {
    --       "type": "dimensions",
    --       "score": 1,
    --       "text": "36x12x24in",
    --       "start_index": 37,
    --       "end_index": 46,
    --       "result": {
    --         "length": 36,
    --         "width": 12,
    --         "height": 24,
    --         "unit": "inch"
    --       }
    --     },
    --     {
    --       "type": "dimension",
    --       "score": 0.9805313966503588,
    --       "text": "24in",
    --       "start_index": 43,
    --       "end_index": 46,
    --       "result": {
    --         "unit": "inch",
    --         "value": 24
    --       }
    --     },
    --     {
    --       "type": "address",
    --       "score": 0.9686815805970408,
    --       "text": "to Amanda Miller’s house at 525 Winchester Blvd in San Jose California. The zip code is 95128. It's really valuable, so insure it for $400 and require an adult signature",
    --       "start_index": 60,
    --       "end_index": 228,
    --       "result": {
    --         "direction": "to",
    --         "name": "Amanda Miller",
    --         "company_name": "Adult Signature",
    --         "address_line1": "525 Winchester Blvd",
    --         "city_locality": "San Jose",
    --         "state_province": "CA",
    --         "postal_code": "95128",
    --         "address_residential_indicator": "yes"
    --       }
    --     },
    --     {
    --       "type": "person",
    --       "score": 0.9519646137063122,
    --       "text": "Amanda Miller",
    --       "start_index": 63,
    --       "end_index": 75,
    --       "result": {
    --         "value": "Amanda Miller"
    --       }
    --     },
    --     {
    --       "type": "residential_indicator",
    --       "score": 0.9519646137063122,
    --       "text": "house",
    --       "start_index": 79,
    --       "end_index": 83,
    --       "result": {
    --         "value": "yes"
    --       }
    --     },
    --     {
    --       "type": "address_line",
    --       "score": 0.9805313966503588,
    --       "text": "525 Winchester Blvd",
    --       "start_index": 88,
    --       "end_index": 106,
    --       "result": {
    --         "line": 1,
    --         "value": "525 Winchester Blvd"
    --       }
    --     },
    --     {
    --       "type": "number",
    --       "score": 0.9805313966503588,
    --       "text": "525",
    --       "start_index": 88,
    --       "end_index": 90,
    --       "result": {
    --         "type": "cardinal",
    --         "value": 525
    --       }
    --     },
    --     {
    --       "type": "city_locality",
    --       "score": 0.9805313966503588,
    --       "text": "San Jose",
    --       "start_index": 111,
    --       "end_index": 118,
    --       "result": {
    --         "value": "San Jose"
    --       }
    --     },
    --     {
    --       "type": "state_province",
    --       "score": 0.9805313966503588,
    --       "text": "California",
    --       "start_index": 120,
    --       "end_index": 129,
    --       "result": {
    --         "name": "California",
    --         "value": "CA"
    --       }
    --     },
    --     {
    --       "type": "postal_code",
    --       "score": 0.9519646137063122,
    --       "text": "95128",
    --       "start_index": 148,
    --       "end_index": 152,
    --       "result": {
    --         "value": "95128"
    --       }
    --     },
    --     {
    --       "type": "insurance",
    --       "score": 0.8530163983409642,
    --       "text": "insure it for $400",
    --       "start_index": 180,
    --       "end_index": 197,
    --       "result": {
    --         "value": 400,
    --         "unit": "USD"
    --       }
    --     },
    --     {
    --       "type": "insured_value",
    --       "score": 1,
    --       "text": "$400",
    --       "start_index": 194,
    --       "end_index": 197,
    --       "result": {
    --         "unit": "USD",
    --         "value": 400
    --       }
    --     },
    --     {
    --       "type": "company",
    --       "score": 0.9519646137063122,
    --       "text": "adult signature",
    --       "start_index": 214,
    --       "end_index": 228,
    --       "result": {
    --         "value": "Adult Signature"
    --       }
    --     },
    --     {
    --       "type": "delivery_confirmation",
    --       "score": 0.8530163983409642,
    --       "text": "adult signature",
    --       "start_index": 214,
    --       "end_index": 228,
    --       "result": {
    --         "name": "Adult Signature",
    --         "value": "adult_signature"
    --       }
    --     }
    --   ]
    -- }

    -- Sample code for parsing the JSON response...
    -- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    DECLARE @Value int

    DECLARE @Unit nvarchar(4000)

    DECLARE @Length int

    DECLARE @Width int

    DECLARE @Height int

    DECLARE @dimensionsUnit nvarchar(4000)

    DECLARE @Amount int

    DECLARE @v_Currency nvarchar(4000)

    DECLARE @v_type nvarchar(4000)

    DECLARE @text nvarchar(4000)

    DECLARE @start_index int

    DECLARE @end_index int

    DECLARE @resultValue int

    DECLARE @resultUnit nvarchar(4000)

    DECLARE @resultLength int

    DECLARE @resultWidth int

    DECLARE @resultHeight int

    DECLARE @Direction nvarchar(4000)

    DECLARE @resultName nvarchar(4000)

    DECLARE @resultCompany_name nvarchar(4000)

    DECLARE @resultAddress_line1 nvarchar(4000)

    DECLARE @resultCity_locality nvarchar(4000)

    DECLARE @resultState_province nvarchar(4000)

    DECLARE @resultPostal_code nvarchar(4000)

    DECLARE @resultAddress_residential_indicator nvarchar(4000)

    DECLARE @Line int

    DECLARE @v_Type nvarchar(4000)

    DECLARE @score nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @score OUT, 'score'
    DECLARE @Confirmation nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Confirmation OUT, 'shipment.confirmation'
    DECLARE @Name nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Name OUT, 'shipment.ship_to.name'
    DECLARE @Company_name nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Company_name OUT, 'shipment.ship_to.company_name'
    DECLARE @Address_line1 nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Address_line1 OUT, 'shipment.ship_to.address_line1'
    DECLARE @City_locality nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @City_locality OUT, 'shipment.ship_to.city_locality'
    DECLARE @State_province nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @State_province OUT, 'shipment.ship_to.state_province'
    DECLARE @Postal_code nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Postal_code OUT, 'shipment.ship_to.postal_code'
    DECLARE @Address_residential_indicator nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Address_residential_indicator OUT, 'shipment.ship_to.address_residential_indicator'
    DECLARE @i int
    SELECT @i = 0
    DECLARE @count_i int
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'shipment.packages'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'IntOf', @Value OUT, 'shipment.packages[i].weight.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @Unit OUT, 'shipment.packages[i].weight.unit'
        EXEC sp_OAMethod @jResp, 'IntOf', @Length OUT, 'shipment.packages[i].dimensions.length'
        EXEC sp_OAMethod @jResp, 'IntOf', @Width OUT, 'shipment.packages[i].dimensions.width'
        EXEC sp_OAMethod @jResp, 'IntOf', @Height OUT, 'shipment.packages[i].dimensions.height'
        EXEC sp_OAMethod @jResp, 'StringOf', @dimensionsUnit OUT, 'shipment.packages[i].dimensions.unit'
        EXEC sp_OAMethod @jResp, 'IntOf', @Amount OUT, 'shipment.packages[i].insured_value.amount'
        EXEC sp_OAMethod @jResp, 'StringOf', @v_Currency OUT, 'shipment.packages[i].insured_value.currency'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'entities'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @v_type OUT, 'entities[i].type'
        EXEC sp_OAMethod @jResp, 'StringOf', @score OUT, 'entities[i].score'
        EXEC sp_OAMethod @jResp, 'StringOf', @text OUT, 'entities[i].text'
        EXEC sp_OAMethod @jResp, 'IntOf', @start_index OUT, 'entities[i].start_index'
        EXEC sp_OAMethod @jResp, 'IntOf', @end_index OUT, 'entities[i].end_index'
        EXEC sp_OAMethod @jResp, 'IntOf', @resultValue OUT, 'entities[i].result.value'
        EXEC sp_OAMethod @jResp, 'StringOf', @resultUnit OUT, 'entities[i].result.unit'
        EXEC sp_OAMethod @jResp, 'IntOf', @resultLength OUT, 'entities[i].result.length'
        EXEC sp_OAMethod @jResp, 'IntOf', @resultWidth OUT, 'entities[i].result.width'
        EXEC sp_OAMethod @jResp, 'IntOf', @resultHeight OUT, 'entities[i].result.height'
        EXEC sp_OAMethod @jResp, 'StringOf', @Direction OUT, 'entities[i].result.direction'
        EXEC sp_OAMethod @jResp, 'StringOf', @resultName OUT, 'entities[i].result.name'
        EXEC sp_OAMethod @jResp, 'StringOf', @resultCompany_name OUT, 'entities[i].result.company_name'
        EXEC sp_OAMethod @jResp, 'StringOf', @resultAddress_line1 OUT, 'entities[i].result.address_line1'
        EXEC sp_OAMethod @jResp, 'StringOf', @resultCity_locality OUT, 'entities[i].result.city_locality'
        EXEC sp_OAMethod @jResp, 'StringOf', @resultState_province OUT, 'entities[i].result.state_province'
        EXEC sp_OAMethod @jResp, 'StringOf', @resultPostal_code OUT, 'entities[i].result.postal_code'
        EXEC sp_OAMethod @jResp, 'StringOf', @resultAddress_residential_indicator OUT, 'entities[i].result.address_residential_indicator'
        EXEC sp_OAMethod @jResp, 'IntOf', @Line OUT, 'entities[i].result.line'
        EXEC sp_OAMethod @jResp, 'StringOf', @v_Type OUT, 'entities[i].result.type'
        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @json
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jResp


END
GO

Curl Command

curl -X POST
	-H "API-Key: {{API_KEY}}"
	-H "Content-Type: application/json"
	-d '{
	"text": "I need to ship a 17lb package that’s 36x12x24in. It’s going to Amanda Miller’s house at 525 Winchester Blvd in San Jose California. The zip code is 95128. It\'s really valuable, so insure it for $400 and require an adult signature please."
}'
https://api.shipengine.com/v1/shipments/recognize

Postman Collection Item JSON

{
  "name": "Parse shipment information",
  "event": [
    {
      "listen": "test",
      "script": {
        "exec": [
          ""
        ],
        "type": "text/javascript"
      }
    }
  ],
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "name": "Content-Type",
        "type": "text",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n\t\"text\": \"I need to ship a 17lb package that’s 36x12x24in. It’s going to Amanda Miller’s house at 525 Winchester Blvd in San Jose California. The zip code is 95128. It's really valuable, so insure it for $400 and require an adult signature please.\"\n}"
    },
    "url": {
      "raw": "https://api.shipengine.com/v1/shipments/recognize",
      "protocol": "https",
      "host": [
        "api",
        "shipengine",
        "com"
      ],
      "path": [
        "v1",
        "shipments",
        "recognize"
      ]
    },
    "description": "ShipEngine can parse more than just addresses. If you think the text may contain other shipment information, like package weight, dimensions, insurance, or carrier preferences, then use our Parse Shipment API instead of our Parse Address API."
  },
  "response": [
    {
      "name": "Parse shipment information",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "name": "Content-Type",
            "type": "text",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n\t\"text\": \"I need to ship a 17lb package that’s 36x12x24in. It’s going to Amanda Miller’s house at 525 Winchester Blvd in San Jose California. The zip code is 95128. It's really valuable, so insure it for $400 and require an adult signature please.\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "https://api.shipengine.com/v1/shipments/recognize",
          "protocol": "https",
          "host": [
            "api",
            "shipengine",
            "com"
          ],
          "path": [
            "v1",
            "shipments",
            "recognize"
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Date",
          "value": "Wed, 18 Sep 2019 16:50:59 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json; charset=utf-8"
        },
        {
          "key": "Transfer-Encoding",
          "value": "chunked"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Access-Control-Allow-Origin",
          "value": "https://www.shipengine.com"
        },
        {
          "key": "Vary",
          "value": "Origin"
        },
        {
          "key": "content-encoding",
          "value": "gzip"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"score\": 0.9604458751176728,\n    \"shipment\": {\n        \"confirmation\": \"adult_signature\",\n        \"ship_to\": {\n            \"name\": \"Amanda Miller\",\n            \"company_name\": \"Adult Signature\",\n            \"address_line1\": \"525 Winchester Blvd\",\n            \"city_locality\": \"San Jose\",\n            \"state_province\": \"CA\",\n            \"postal_code\": \"95128\",\n            \"address_residential_indicator\": \"yes\"\n        },\n        \"packages\": [\n            {\n                \"weight\": {\n                    \"value\": 17,\n                    \"unit\": \"pound\"\n                },\n                \"dimensions\": {\n                    \"length\": 36,\n                    \"width\": 12,\n                    \"height\": 24,\n                    \"unit\": \"inch\"\n                },\n                \"insured_value\": {\n                    \"amount\": 400,\n                    \"currency\": \"USD\"\n                }\n            }\n        ]\n    },\n    \"entities\": [\n        {\n            \"type\": \"weight\",\n            \"score\": 0.9805313966503588,\n            \"text\": \"17lb\",\n            \"start_index\": 17,\n            \"end_index\": 20,\n            \"result\": {\n                \"value\": 17,\n                \"unit\": \"pound\"\n            }\n        },\n        {\n            \"type\": \"dimensions\",\n            \"score\": 1,\n            \"text\": \"36x12x24in\",\n            \"start_index\": 37,\n            \"end_index\": 46,\n            \"result\": {\n                \"length\": 36,\n                \"width\": 12,\n                \"height\": 24,\n                \"unit\": \"inch\"\n            }\n        },\n        {\n            \"type\": \"dimension\",\n            \"score\": 0.9805313966503588,\n            \"text\": \"24in\",\n            \"start_index\": 43,\n            \"end_index\": 46,\n            \"result\": {\n                \"unit\": \"inch\",\n                \"value\": 24\n            }\n        },\n        {\n            \"type\": \"address\",\n            \"score\": 0.9686815805970408,\n            \"text\": \"to Amanda Miller’s house at 525 Winchester Blvd in San Jose California. The zip code is 95128. It's really valuable, so insure it for $400 and require an adult signature\",\n            \"start_index\": 60,\n            \"end_index\": 228,\n            \"result\": {\n                \"direction\": \"to\",\n                \"name\": \"Amanda Miller\",\n                \"company_name\": \"Adult Signature\",\n                \"address_line1\": \"525 Winchester Blvd\",\n                \"city_locality\": \"San Jose\",\n                \"state_province\": \"CA\",\n                \"postal_code\": \"95128\",\n                \"address_residential_indicator\": \"yes\"\n            }\n        },\n        {\n            \"type\": \"person\",\n            \"score\": 0.9519646137063122,\n            \"text\": \"Amanda Miller\",\n            \"start_index\": 63,\n            \"end_index\": 75,\n            \"result\": {\n                \"value\": \"Amanda Miller\"\n            }\n        },\n        {\n            \"type\": \"residential_indicator\",\n            \"score\": 0.9519646137063122,\n            \"text\": \"house\",\n            \"start_index\": 79,\n            \"end_index\": 83,\n            \"result\": {\n                \"value\": \"yes\"\n            }\n        },\n        {\n            \"type\": \"address_line\",\n            \"score\": 0.9805313966503588,\n            \"text\": \"525 Winchester Blvd\",\n            \"start_index\": 88,\n            \"end_index\": 106,\n            \"result\": {\n                \"line\": 1,\n                \"value\": \"525 Winchester Blvd\"\n            }\n        },\n        {\n            \"type\": \"number\",\n            \"score\": 0.9805313966503588,\n            \"text\": \"525\",\n            \"start_index\": 88,\n            \"end_index\": 90,\n            \"result\": {\n                \"type\": \"cardinal\",\n                \"value\": 525\n            }\n        },\n        {\n            \"type\": \"city_locality\",\n            \"score\": 0.9805313966503588,\n            \"text\": \"San Jose\",\n            \"start_index\": 111,\n            \"end_index\": 118,\n            \"result\": {\n                \"value\": \"San Jose\"\n            }\n        },\n        {\n            \"type\": \"state_province\",\n            \"score\": 0.9805313966503588,\n            \"text\": \"California\",\n            \"start_index\": 120,\n            \"end_index\": 129,\n            \"result\": {\n                \"name\": \"California\",\n                \"value\": \"CA\"\n            }\n        },\n        {\n            \"type\": \"postal_code\",\n            \"score\": 0.9519646137063122,\n            \"text\": \"95128\",\n            \"start_index\": 148,\n            \"end_index\": 152,\n            \"result\": {\n                \"value\": \"95128\"\n            }\n        },\n        {\n            \"type\": \"insurance\",\n            \"score\": 0.8530163983409642,\n            \"text\": \"insure it for $400\",\n            \"start_index\": 180,\n            \"end_index\": 197,\n            \"result\": {\n                \"value\": 400,\n                \"unit\": \"USD\"\n            }\n        },\n        {\n            \"type\": \"insured_value\",\n            \"score\": 1,\n            \"text\": \"$400\",\n            \"start_index\": 194,\n            \"end_index\": 197,\n            \"result\": {\n                \"unit\": \"USD\",\n                \"value\": 400\n            }\n        },\n        {\n            \"type\": \"company\",\n            \"score\": 0.9519646137063122,\n            \"text\": \"adult signature\",\n            \"start_index\": 214,\n            \"end_index\": 228,\n            \"result\": {\n                \"value\": \"Adult Signature\"\n            }\n        },\n        {\n            \"type\": \"delivery_confirmation\",\n            \"score\": 0.8530163983409642,\n            \"text\": \"adult signature\",\n            \"start_index\": 214,\n            \"end_index\": 228,\n            \"result\": {\n                \"name\": \"Adult Signature\",\n                \"value\": \"adult_signature\"\n            }\n        }\n    ]\n}"
    }
  ]
}