With the UPS Delivery Intercept® API, a shipper can manage the delivery details of their shipment, prior to delivery. # Business Values Key Business Values: - elimination of manually processing customer requests - acceptance of requests later in the delivery process <a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Ca+href%3D"https://developer.ups.com/api/reference/deliveryintercept/product-info%5C" rel="nofollow">https://developer.ups.com/api/reference/deliveryintercept/product-info\" target="_blank" rel="noopener">Product Info <a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Ca+href%3D"https://god.gw.postman.com/run-collection/29542085-f2409ef1-39c9-4f4a-a509-a3f860068ff4?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D29542085-f2409ef1-39c9-4f4a-a509-a3f860068ff4%26entityType%3Dcollection%26workspaceId%3D7e7595f0-4829-4f9a-aee1-75c126b9d417%5C" rel="nofollow">https://god.gw.postman.com/run-collection/29542085-f2409ef1-39c9-4f4a-a509-a3f860068ff4?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D29542085-f2409ef1-39c9-4f4a-a509-a3f860068ff4%26entityType%3Dcollection%26workspaceId%3D7e7595f0-4829-4f9a-aee1-75c126b9d417\" target="_blank" rel="noopener noreferrer"> <img src="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Ca+href%3D"https://run.pstmn.io/button.svg%5C" rel="nofollow">https://run.pstmn.io/button.svg\" alt="Run In Postman" style="width: 128px; height: 32px;"> # CIE Behavior The Delivery Intercept API will return a stubbed success response if the correct data is used for a given endpoint. The static data that is valid for each of the endpoints is in the table below: | Endpoint | transId | trackingNumber | |------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | /charges | SIICharges | 1Z4096YY0316914058 | /willcall | SIIWillcall | 1Z4096YY0316914058 | /return | SIIReturn | 1Z4096YY0316914058 | /reschedule | SIIReschedule | 1Z4096YY0316914058 | /redirect/address | SIIRedirect | 1Z4096YY0316914058 | /cancel | SIICancel | 1Z4096YY0316914058
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.0
- Package version: 1.0.9
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/abantecart/ups-delivery-intercept.git"
}
],
"require": {
"abantecart/ups-delivery-intercept": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php:
require_once('/path/to/DeliveryIntercept/vendor/autoload.php');To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: OAuth2
$config = UPS\DeliveryIntercept\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new UPS\DeliveryIntercept\Request\DeliveryInterceptApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$trans_id = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | A unique value that will be used to identify the transaction for logging and troubleshooting purposes.
$transaction_src = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | Identifies the client/source application that is calling the API.
$accept = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The Accept request HTTP header indicates which content types, expressed as MIME types, the client is able to understand.
$content_type = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | describes the content type to expect
$tracking_number = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The number being tracked. Each method defines if required.
$body = new \UPS\DeliveryIntercept\DeliveryIntercept\MyChoiceCommonRequest(); // \UPS\DeliveryIntercept\DeliveryIntercept\MyChoiceCommonRequest |
$loc = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The locale of the client application to ensure that translations on the response are in the proper language.
try {
$result = $apiInstance->cancelExistingRequest($trans_id, $transaction_src, $accept, $content_type, $tracking_number, $body, $loc);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DeliveryInterceptApi->cancelExistingRequest: ', $e->getMessage(), PHP_EOL;
}
// Configure OAuth2 access token for authorization: OAuth2
$config = UPS\DeliveryIntercept\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new UPS\DeliveryIntercept\Request\DeliveryInterceptApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$trans_id = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | A unique value that will be used to identify the transaction for logging and troubleshooting purposes.
$transaction_src = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | Identifies the client/source application that is calling the API.
$accept = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The Accept request HTTP header indicates which content types, expressed as MIME types, the client is able to understand.
$content_type = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | describes the content type to expect
$tracking_number = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The number being tracked. Each method defines if required.
$body = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // |
$loc = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The locale of the client application to ensure that translations on the response are in the proper language.
try {
$result = $apiInstance->getCharges($trans_id, $transaction_src, $accept, $content_type, $tracking_number, $body, $loc);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DeliveryInterceptApi->getCharges: ', $e->getMessage(), PHP_EOL;
}
// Configure OAuth2 access token for authorization: OAuth2
$config = UPS\DeliveryIntercept\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new UPS\DeliveryIntercept\Request\DeliveryInterceptApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$trans_id = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | A unique value that will be used to identify the transaction for logging and troubleshooting purposes.
$transaction_src = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | Identifies the client/source application that is calling the API.
$accept = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The Accept request HTTP header indicates which content types, expressed as MIME types, the client is able to understand.
$content_type = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | describes the content type to expect
$tracking_number = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The number being tracked. Each method defines if required.
$body = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // |
$loc = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The locale of the client application to ensure that translations on the response are in the proper language.
try {
$result = $apiInstance->submitDeliverToAnotherAddressRequest($trans_id, $transaction_src, $accept, $content_type, $tracking_number, $body, $loc);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DeliveryInterceptApi->submitDeliverToAnotherAddressRequest: ', $e->getMessage(), PHP_EOL;
}
// Configure OAuth2 access token for authorization: OAuth2
$config = UPS\DeliveryIntercept\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new UPS\DeliveryIntercept\Request\DeliveryInterceptApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$trans_id = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | A unique value that will be used to identify the transaction for logging and troubleshooting purposes.
$transaction_src = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | Identifies the client/source application that is calling the API.
$accept = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The Accept request HTTP header indicates which content types, expressed as MIME types, the client is able to understand.
$content_type = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | describes the content type to expect
$tracking_number = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The number being tracked. Each method defines if required.
$body = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // |
$loc = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The locale of the client application to ensure that translations on the response are in the proper language.
try {
$result = $apiInstance->submitRescheduleDelivery($trans_id, $transaction_src, $accept, $content_type, $tracking_number, $body, $loc);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DeliveryInterceptApi->submitRescheduleDelivery: ', $e->getMessage(), PHP_EOL;
}
// Configure OAuth2 access token for authorization: OAuth2
$config = UPS\DeliveryIntercept\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new UPS\DeliveryIntercept\Request\DeliveryInterceptApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$trans_id = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | A unique value that will be used to identify the transaction for logging and troubleshooting purposes.
$transaction_src = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | Identifies the client/source application that is calling the API.
$accept = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The Accept request HTTP header indicates which content types, expressed as MIME types, the client is able to understand.
$content_type = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | describes the content type to expect
$tracking_number = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The number being tracked. Each method defines if required.
$body = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // |
$loc = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The locale of the client application to ensure that translations on the response are in the proper language.
try {
$result = $apiInstance->submitReturnToSender($trans_id, $transaction_src, $accept, $content_type, $tracking_number, $body, $loc);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DeliveryInterceptApi->submitReturnToSender: ', $e->getMessage(), PHP_EOL;
}
// Configure OAuth2 access token for authorization: OAuth2
$config = UPS\DeliveryIntercept\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new UPS\DeliveryIntercept\Request\DeliveryInterceptApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$trans_id = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | A unique value that will be used to identify the transaction for logging and troubleshooting purposes.
$transaction_src = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | Identifies the client/source application that is calling the API.
$accept = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The Accept request HTTP header indicates which content types, expressed as MIME types, the client is able to understand.
$content_type = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | describes the content type to expect
$tracking_number = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The number being tracked. Each method defines if required.
$body = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // |
$loc = new \UPS\DeliveryIntercept\DeliveryIntercept\null(); // | The locale of the client application to ensure that translations on the response are in the proper language.
try {
$result = $apiInstance->submitWillCall($trans_id, $transaction_src, $accept, $content_type, $tracking_number, $body, $loc);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DeliveryInterceptApi->submitWillCall: ', $e->getMessage(), PHP_EOL;
}
?>All URIs are relative to https://wwwcie.ups.com/api/deliveryintercept/{version}
| Class | Method | HTTP request | Description |
|---|---|---|---|
| DeliveryInterceptApi | cancelExistingRequest | POST /cancel/{trackingNumber} | cancel an existing Delivery Intercept request |
| DeliveryInterceptApi | getCharges | POST /charges/{trackingNumber} | charges by inquiry type |
| DeliveryInterceptApi | submitDeliverToAnotherAddressRequest | POST /redirect/address/{trackingNumber} | Submission to request a new delivery address. |
| DeliveryInterceptApi | submitRescheduleDelivery | POST /reschedule/{trackingNumber} | change to a new delivery date in the future. |
| DeliveryInterceptApi | submitReturnToSender | POST /return/{trackingNumber} | redirect the package back to the sender |
| DeliveryInterceptApi | submitWillCall | POST /willcall/{trackingNumber} | redirect a package to a Customer center for pickup. |
- AddressBookEntry
- AddressInformation
- AddressInformationParsedStreetAddress
- ChargesInfo
- ContactInfo
- ErrorResponse
- ErrorResponseHeaders
- ErrorResponseResponse
- LocationHoursOfOperation
- MultiTrackingNumbers
- MyChoiceCancelExistingRequest
- MyChoiceCommonRequest
- MyChoiceCommonResponse
- MyChoiceConsolidatorError
- MyChoiceDeliverToAnotherAddressRequest
- MyChoiceDeliverToAnotherAddressResponse
- MyChoiceInterceptCommonRequest
- MyChoiceInterceptCommonResponse
- MyChoiceRedirectChargesRequest
- MyChoiceRescheduleDeliveryRequest
- MyChoiceRescheduleDeliveryResponse
- MyChoiceReturnToSenderRequest
- MyChoiceReturnToSenderResponse
- MyChoiceWillCallRequest
- MyChoiceWillCallResponse
- PaymentContainer
- PaymentContainerAccountInfo
- PaymentContainerCreditCardInfo
- PaymentContainerCreditCardInfoTokenObj
- PaymentContainerCreditCardInfoTokenObjCardType
- PaymentContainerPaypalAccount
- SuccessResponseHeaders
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes: