Search code examples
xmlups

UPS ShipConfirm Request for label printing


Could anyone tell me what I need to specify in LabelSpecification section of UPS xml request document in order to print EPL shipping label? The following is what I have:

  <LabelSpecification>
    <LabelPrintMethod>
      <Code>EPL</Code>
    </LabelPrintMethod>
    <HTTPUserAgent>Mozilla/5.0</HTTPUserAgent>
    <LabelImageFormat>
      <Code>GIF</Code>
    </LabelImageFormat>
  </LabelSpecification>

But I keep getting the following error in the response:

Missing/Invalid Combination of LabelSpecification/LabelStockSize

I've tried using 'EPL2' as well with no avail. And I've no idea where to specify LabelStockSize. UPS website isn't very helpful in this regard. Thanks in advance.


Solution

  • Yahooing, I found examples like this:

    <LabelSpecification>
      <LabelPrintMethod>
        <Code>EPL</Code>
      </LabelPrintMethod>
      <LabelStockSize>
        <Height>4</Height>
        <Width>6</Width>
      </LabelStockSize>
    </LabelSpecification>
    

    and this:

    <LabelSpecification>
      <LabelStockSize>
        <Height>4</Height>
        <Width>6</Width>
      </LabelStockSize>
      <LabelPrintMethod>
        <Code>EPL</Code>
        <Description>epl file</Description>
      </LabelPrintMethod>...
    

    In other words, it looks like <LabelStockSize> needs to be a child of <LabelSpecification>, but can come before or after <LabelPrintMethod>.