Krengel Ship for UPS Shipment Void
From Wiki
| User Guide |
Contents |
Overview
The Krengel Ship for UPS Shipment Void API allows you to cancel previously scheduled shipments in part or fully. Currently this example program allows only full shipments to be cancelled, but the API function UPS_shipVoid can perform partial shipment voids.
Example
Pressing Enter will submit this request to the UPS Shipment Void API, and return a response as shown below:
Technical Information
This API section in UPSUI is making use of the following elements:
Request Tables
The request data is stored in UPSSVRQ and UPSSVRQPK.
Table Structure - UPSSVRQ
| Name | Data Type | Description | Notes |
|---|---|---|---|
| UID | 15,0 packed | Record Unique ID | |
| USERID | 30 characters | UPS User ID | |
| SHIPNBR | 21 characters | Shipment ID Number | |
| EXPVOID | 1 character | T or Y = Expanded Void Ind. |
Table Structure - UPSSVRQPK
| Name | Data Type | Description | Notes |
|---|---|---|---|
| PID | 15,0 packed | Parent Unique ID | |
| UID | 15,0 packed | Child Unique ID | |
| TRACKNBR | 21 characters | Package Tracking Number |
Response Table
The response data is stored in UPSSVRS and UPSSVRSPK.
Table Structure - UPSSVRS
| Name | Data Type | Description | Notes |
|---|---|---|---|
| UID | 15,0 packed | Record Unique ID | |
| EXPVOID | 1 character | T or Y = Expanded Void Ind. | |
| STSCD | 1 character | Void Status Code | |
| STSDSC | 15 characters | Void Status Desc. |
Table Structure - UPSSVRSPK
| Name | Data Type | Description | Notes |
|---|---|---|---|
| PID | 15,0 packed | Parent Unique ID | |
| UID | 15,0 packed | Child Unique ID | |
| TRACKNBR | 21 characters | Package Tracking Number | |
| STSCD | 1 character | Void Status Code | |
| STSDSC | 15 characters | Void Status Desc. |
API Function
The Krengel Ship for UPS API function used is UPS_shipVoid.
Technical Example
This is a brief explanation of how this API is implemented in the included Krengel Ship for UPS User Interface program. You can use the source code for the Krengel Ship for UPS User Interface combined with this example to implement the API in your existing business programs.
- Define the Krengel Ship for UPS Error Data Structure.
- Call UPS_getUID to get the UID that will be used to store and identify the record in UPSSVRQ.
- Insert a record into UPSSVRQ.
- For each package you would like to void, call UPS_getUID to get the UID that will be used to store and identify the record in UPSSVRQPK.
- Insert each package into UPSSVRQPK.
- Call UPS_shipVoid, passing the UID and the Krengel Ship for UPS Error Data Structure.
- The UPS_shipVoid API will send the request to the UPS web service, and will store the response in UPSSVRS.
- Check the Krengel Ship for UPS Error Data Structure to see if an error occurred. If an error did not occur, you may read the records out of UPSSVRS and UPSSVRSPK.

