cre8-it / creatorsapi-laravel
There is no license information available for the latest version (v2.0.0) of this package.
Laravel wrapper for amazon creatorsapi-php-sdk
v2.0.0
2026-09-24 09:23 UTC
Requires
- php: ^8.2
- cre8-it/creatorsapi-php-sdk: dev-main
- illuminate/support: ^12.0|^13.0
Requires (Dev)
- orchestra/testbench: ^10.0|^11.0
- phpunit/phpunit: ^11.0|^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-24 09:24:21 UTC
README
Small Laravel wrapper around the Amazon Creators API PHP SDK.
Requirements
- PHP 8.2+ (Laravel 13 requires PHP 8.3+)
- Laravel 12 or 13
The committed development lockfile targets Laravel 13 / PHP 8.3. The CI matrix also tests Laravel 12 / PHP 8.2 with Orchestra Testbench (see .github/workflows/tests.yml). To run the default suite locally:
composer install vendor/bin/phpunit
Configuration
Publish the config:
php artisan vendor:publish --tag=creatorsapi-config
Environment options:
CREATORSAPI_CREDENTIAL_ID=
CREATORSAPI_CREDENTIAL_SECRET=
CREATORSAPI_CREDENTIAL_VERSION=
CREATORSAPI_AUTH_ENDPOINT=
CREATORSAPI_HOST=https://creatorsapi.amazon
CREATORSAPI_USER_AGENT=creatorsapi-laravel
CREATORSAPI_DEBUG=false
CREATORSAPI_DEBUG_FILE=php://output
CREATORSAPI_TEMP_FOLDER=
CREATORSAPI_HTTP_TIMEOUT=30
CREATORSAPI_HTTP_CONNECT_TIMEOUT=10
CREATORSAPI_HTTP_PROXY=
CREATORSAPI_HTTP_VERIFY=true
Usage
Examples below follow the SDK samples (SampleSearchItems.php, SampleGetItems.php), adapted for Laravel with fluent chaining.
SearchItems
use CreatorsApi\Laravel\Facades\CreatorsApi; use Amazon\CreatorsAPI\v1\com\amazon\creators\model\SearchItemsResource; use Amazon\CreatorsAPI\v1\ApiException; try { $response = CreatorsApi::searchItems() ->marketplace('www.amazon.com') ->partnerTag('yourtag-20') ->keywords('Harry Potter') ->searchIndex('Books') ->itemCount(2) ->resources([ SearchItemsResource::IMAGES_PRIMARY_MEDIUM, SearchItemsResource::ITEM_INFO_TITLE, SearchItemsResource::OFFERS_V2_LISTINGS_AVAILABILITY, SearchItemsResource::OFFERS_V2_LISTINGS_PRICE, ]) ->send(); } catch (ApiException $e) { report($e); }
GetItems
use CreatorsApi\Laravel\Facades\CreatorsApi; use Amazon\CreatorsAPI\v1\com\amazon\creators\model\GetItemsResource; use Amazon\CreatorsAPI\v1\ApiException; try { $response = CreatorsApi::getItems() ->marketplace('www.amazon.com') ->partnerTag('yourtag-20') ->itemIds(['B0DLFMFBJW', 'B0BFC7WQ6R', 'B00ZV9RDKK']) ->resources([ GetItemsResource::IMAGES_PRIMARY_MEDIUM, GetItemsResource::ITEM_INFO_TITLE, GetItemsResource::ITEM_INFO_FEATURES, GetItemsResource::OFFERS_V2_LISTINGS_PRICE, GetItemsResource::OFFERS_V2_LISTINGS_AVAILABILITY, ]) ->send(); } catch (ApiException $e) { report($e); }