This API provides a Global Landed Cost (GLC) duty and tax rate quote for shippers. ## Key Business Values - Simplifies the International Cross Border shipping process. For more information on the Global Checkout API, please visit the <a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Ca+href%3D"https://developer.ups.com/api/reference/globalcheckout/product-info%5C" rel="nofollow">https://developer.ups.com/api/reference/globalcheckout/product-info\" target="_blank" rel="noopener noreferrer">Product Info page. <a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Ca+href%3D"https://developer.ups.com/api/reference/globalcheckout/appendix?loc=en_US%5C" rel="nofollow">https://developer.ups.com/api/reference/globalcheckout/appendix?loc=en_US\" target="_blank" rel="noopener noreferrer">Appendix
Explore API documentation and sample applications through GitHub.
<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Ca+href%3D"https://github.com/UPS-API%5C">https://github.com/UPS-API\" target="_blank" rel="noopener noreferrer"> <img src="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Ca+href%3D"https://www.ups.com/assets/resources/webcontent/images/gitHubButton.svg%5C" rel="nofollow">https://www.ups.com/assets/resources/webcontent/images/gitHubButton.svg\" alt="Open in GitHub" style="width: 128px; height: 32px;">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-global-checkout.git"
}
],
"require": {
"abantecart/ups-global-checkout": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php:
require_once('/path/to/GlobalCheckout/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\GlobalCheckout\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new UPS\GlobalCheckout\Request\GlobalCheckoutApi(
// 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\GlobalCheckout\GlobalCheckout\null(); // | An identifier unique to the request.
$transaction_src = new \UPS\GlobalCheckout\GlobalCheckout\null(); // | Identifies the client/source application that is calling.
$accept = new \UPS\GlobalCheckout\GlobalCheckout\null(); // | The Accept request HTTP header indicates which content types, expressed as MIME types, the client is able to understand.
$content_type = new \UPS\GlobalCheckout\GlobalCheckout\null(); // | The Content-Type header provides the client with the actual content/media type of the returned content.
$body = new \UPS\GlobalCheckout\GlobalCheckout\BSISV1QuoteRequest(); // \UPS\GlobalCheckout\GlobalCheckout\BSISV1QuoteRequest |
$registration_id = new \UPS\GlobalCheckout\GlobalCheckout\null(); // | The Customer Registration Identifier used to validate the shipper account. If not passed then it will be obtained with the OAuth token's UUID.
try {
$result = $apiInstance->createGuaranteedQuote($trans_id, $transaction_src, $accept, $content_type, $body, $registration_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling GlobalCheckoutApi->createGuaranteedQuote: ', $e->getMessage(), PHP_EOL;
}
?>All URIs are relative to https://wwwcie.ups.com/api/brokerage/{version}
| Class | Method | HTTP request | Description |
|---|---|---|---|
| GlobalCheckoutApi | createGuaranteedQuote | POST /content/glc/request-quote | returns a guaranteed landed cost quote |
- BSISV1Address
- BSISV1ChargeDetail
- BSISV1Error
- BSISV1ErrorResponse
- BSISV1ErrorResponseHeaders
- BSISV1ErrorResponseResponse
- BSISV1QuoteRequest
- BSISV1QuoteResponse
- BSISV1Shipment
- BSISV1ShipmentItemRequest
- BSISV1ShipmentItemRequestDimension
- BSISV1ShipmentItemRequestGrossWeight
- BSISV1ShipmentItemRequestQuantity
- BSISV1SuccessResponseHeaders
- BSISV1TotalResponse
- Type: HTTP bearer authentication
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes: