Download the PHP package rajpurohithitesh/paapi5-php-sdk without Composer
On this page you can find all versions of the php package rajpurohithitesh/paapi5-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rajpurohithitesh/paapi5-php-sdk
More information about rajpurohithitesh/paapi5-php-sdk
Files in rajpurohithitesh/paapi5-php-sdk
Package paapi5-php-sdk
Short Description Amazon's Official Product Advertising API v5 PHP SDK with OffersV2
License Apache-2.0
Homepage https://webservices.amazon.com/paapi5/documentation/index.html
Informations about the package paapi5-php-sdk
Product Advertising API 5.0 SDK for PHP
This repository contains the open source PHP SDK that allows you to access the Product Advertising API from your PHP app.
🚨 Version 1.0.0 - Breaking Changes
Legacy Offers v1 has been completely removed. This SDK now exclusively supports OffersV2.
If you're upgrading from v1.x:
- Replace all
OFFERSLISTINGS*withOFFERS_V2LISTINGS* - Change
getOffers()togetOffersV2() - Update price access:
getPrice()->getMoney()->getDisplayAmount()
See MIGRATION_GUIDE_V2.md for complete migration instructions.
Installation
The Product Advertising API PHP SDK can be installed with Composer. The SDK is available via Packagist under the rajpurohithitesh/paapi5-php-sdk package. If Composer is installed globally on your system, you can run the following in the base directory of your project to add the SDK as a dependency:
Usage
Note: This version of the Product Advertising API SDK for PHP requires PHP 8.0 or greater.
Simple example for SearchItems to discover Amazon products with the keyword 'Harry Potter' in Books category:
Complete documentation, installation instructions, and examples are available here.
OffersV2 Support
This SDK includes complete support for OffersV2, Amazon's enhanced offers API with improved reliability and data quality. OffersV2 is recommended over the legacy Offers API.
Key Features of OffersV2
- Enhanced Availability Information: Detailed stock status with message, min/max order quantities
- Complete Condition Details: Value, SubCondition, and ConditionNote
- Deal Details: Lightning Deals, Prime Exclusive Deals with Badge, AccessType, StartTime, EndTime, PercentClaimed, and Early Access Duration
- Merchant Information: Name and ID
- Enhanced Pricing:
- Money (Amount, Currency, DisplayAmount)
- PricePerUnit
- SavingBasis (Type, TypeLabel, Money) - NEW!
- Savings (Money, Percentage) - NEW!
- Offer Type: LIGHTNING_DEAL, SUBSCRIBE_AND_SAVE
- ViolatesMAP: Minimum Advertised Price flag
- Loyalty Points: Japan marketplace support
OffersV2 Resources Available
The SDK provides granular resource constants for all OffersV2 fields across all operations (GetItems, SearchItems, GetVariations):
Availability Resources
OFFERS_V2LISTINGSAVAILABILITYOFFERS_V2LISTINGSAVAILABILITYMAX_ORDER_QUANTITYOFFERS_V2LISTINGSAVAILABILITYMESSAGEOFFERS_V2LISTINGSAVAILABILITYMIN_ORDER_QUANTITYOFFERS_V2LISTINGSAVAILABILITYTYPE
Condition Resources
OFFERS_V2LISTINGSCONDITIONOFFERS_V2LISTINGSCONDITIONCONDITION_NOTEOFFERS_V2LISTINGSCONDITIONSUB_CONDITIONOFFERS_V2LISTINGSCONDITIONVALUE
Deal Details Resources (NEW)
OFFERS_V2LISTINGSDEAL_DETAILSOFFERS_V2LISTINGSDEAL_DETAILSACCESS_TYPEOFFERS_V2LISTINGSDEAL_DETAILSBADGEOFFERS_V2LISTINGSDEAL_DETAILSEARLY_ACCESS_DURATION_IN_MILLISECONDSOFFERS_V2LISTINGSDEAL_DETAILSEND_TIMEOFFERS_V2LISTINGSDEAL_DETAILSPERCENT_CLAIMEDOFFERS_V2LISTINGSDEAL_DETAILSSTART_TIME
Price Resources with SavingBasis and Savings (NEW)
OFFERS_V2LISTINGSPRICEOFFERS_V2LISTINGSPRICEMONEYOFFERS_V2LISTINGSPRICEPRICE_PER_UNITOFFERS_V2LISTINGSPRICESAVING_BASISOFFERS_V2LISTINGSPRICESAVING_BASISMONEYOFFERS_V2LISTINGSPRICESAVING_BASISSAVING_BASIS_TYPEOFFERS_V2LISTINGSPRICESAVING_BASISSAVING_BASIS_TYPE_LABELOFFERS_V2LISTINGSPRICESAVINGSOFFERS_V2LISTINGSPRICESAVINGSMONEYOFFERS_V2LISTINGSPRICESAVINGSPERCENTAGE
Merchant Info Resources
OFFERS_V2LISTINGSMERCHANT_INFOOFFERS_V2LISTINGSMERCHANT_INFOIDOFFERS_V2LISTINGSMERCHANT_INFONAME
Other Resources
OFFERS_V2LISTINGSIS_BUY_BOX_WINNEROFFERS_V2LISTINGSLOYALTY_POINTSOFFERS_V2LISTINGSLOYALTY_POINTSPOINTSOFFERS_V2LISTINGSTYPEOFFERS_V2LISTINGSVIOLATES_MAP
Sample Code
See SampleOffersV2Api.php for complete examples demonstrating:
- GetItems with complete OffersV2 hierarchy
- SearchItems with OffersV2
- Deal Details extraction
- SavingBasis and Savings calculation
- All OffersV2 fields parsing
Quick Example
For complete OffersV2 documentation, visit: https://webservices.amazon.com/paapi5/documentation/offersV2.html
License
This SDK is distributed under the Apache License, Version 2.0, see LICENSE.txt and NOTICE.txt for more information.
All versions of paapi5-php-sdk with dependencies
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.0