Sidebar Menu

GetIntelligentMailBarcode

The GetIntelligentMailBarcode method returns Intelligent Mail Barcode data using the key obtained from the VerifyAddressAdvanced method.

Endpoint

GET (HTTP): https://pav3.cdyne.com/PavService.svc/GetIntelligentMailBarcode?BarcodeIdentifier={BARCODEIDENTIFIER}&ServiceTypeIdentifier={SERVICETYPEIDENTIFIER}&MailerIdentifier={MAILERIDENTIFIER}&SerialNumber={SERIALNUMBER}&IntelligentMailBarcodeKey={INTELLIGENTMAILBARCODEKEY}&LicenseKey={LICENSEKEY}

GET (HTTPS): https://pav3.cdyne.com/PavService.svc/rest_s/GetIntelligentMailBarcode?BarcodeIdentifier={BARCODEIDENTIFIER}&ServiceTypeIdentifier={SERVICETYPEIDENTIFIER}&MailerIdentifier={MAILERIDENTIFIER}&SerialNumber={SERIALNUMBER}&IntelligentMailBarcodeKey={INTELLIGENTMAILBARCODEKEY}&LicenseKey={LICENSEKEY}

Syntax

GetIntelligentMailBarcode(BarcodeIdentifier, ServiceTypeIdentifier, MailerIdentifier, SerialNumber, IntelligentMailBarcodeKey, LicenseKey)

Request Parameters

Parameter Name Description Data Type Required Sample Value
BarcodeIdentifier

Barcode identifier. (Consult USPS.com for more info.)

String
ServiceTypeIdentifier

Service type identifier (STID). (Consult USPS.com for more info.)

String
MailerIdentifier

Mailer identifier (assigned by USPS).

String
SerialNumber

Serial number. (Consult USPS.com for more info.)

String
IntelligentMailBarcodeKey

Barcode key returned from calling VerifyAddressAdvanced method.

String
LicenseKey

Your license key.

String True F01d89fd-5155-5455-5585-e84ab8de8591

Response

Returns: IntelligentBarcodeResponse object

Code Samples

// http://pav3.cdyne.com/PavService.svc?wsdl was added as Service Reference and given the name WSDL

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GetIntelligentMailBarcode.WSDL;

namespace GetIntelligentMailBarcode
{
    class Program
    {
        static void Main(string[] args)
        {
            WSDL.PavServiceClient PSC = new WSDL.PavServiceClient("pavsoap");
            WSDL.IntelligentBarcodeResponse IMB = new WSDL.IntelligentBarcodeResponse();

            IMB = PSC.GetIntelligentMailBarcode("12", "123", "123456", "123456789", "dw/cKC9h9Au0zJy+WGvQkQ==", "YOUR LICENSE KEY");

            if (IMB.ReturnCode == 0)
                Console.WriteLine("Intelligent Mail Barcode: " + IMB.Barcode);
            else if (IMB.ReturnCode == 1)
                Console.WriteLine("Invalid input.");

            Console.ReadLine();
        }
    }
}
<cfhttp method="GET" url="http://pav3.cdyne.com/PavService.svc/GetIntelligentMailBarcode" result="result">
  <cfhttpparam type="URL" name="BarcodeIdentifier" value="12">
  <cfhttpparam type="URL" name="ServiceTypeIdentifier" value="123">
  <cfhttpparam type="URL" name="MailerIdentifier" value="123456">
  <cfhttpparam type="URL" name="SerialNumber" value="123456789">
  <cfhttpparam type="URL" name="IntelligentMailBarcodeKey" value="dw/cKC9h9Au0zJy+WGvQkQ==">
  <cfhttpparam type="URL" name="LicenseKey" value="YOUR LICENSE KEY">
</cfhttp>
<cfset xmlDoc = XmlParse(#result.FileContent#) />
<cfdump var="#xmlDoc#" />
' http://pav3.cdyne.com/PavService.svc?wsdl was added as Service Reference and given the name WSDL

Imports GetIntelligentMailBarcode.WSDL
Module Module1

    Sub Main()

        Dim PSC As New PavServiceClient("pavsoap")
        Dim IMB As New IntelligentBarcodeResponse

        IMB = PSC.GetIntelligentMailBarcode("12", "123", "123456", "123456789", "dw/cKC9h9Au0zJy+WGvQkQ==", "YOUR LICENSE KEY")

        If IMB.ReturnCode = 0 Then
            Console.WriteLine("Barcode: " & IMB.Barcode)

        ElseIf IMB.ReturnCode = 1 Then
            Console.WriteLine("Invalid input.")
        End If

        Console.ReadLine()

    End Sub

End Module
<?php
$client = new SoapClient('http://pav3.cdyne.com/PavService.svc?wsdl');
$param = array(
  'BarcodeIdentifier' => '12'
  , 'ServiceTypeIdentifier' => '123'
  , 'MailerIdentifier' => '123456'
  , 'SerialNumber' => '123456789'
  , 'IntelligentMailBarcodeKey' => 'dw/cKC9h9Au0zJy+WGvQkQ=='
  , 'LicenseKey' => 'YOUR LICENSE KEY'
);
$result = $client->GetIntelligentMailBarcode($param);

echo "<pre>";
print_r($result);
echo "</pre>";
?>
{
  "Barcode": "String content",
  "ReturnCode": 0
}
<IntelligentBarcodeResponse xmlns="pav3.cdyne.com">
  <Barcode>String content</Barcode>
  <ReturnCode>0</ReturnCode>
</IntelligentBarcodeResponse>