cre8-it/creatorsapi-laravel

There is no license information available for the latest version (v1.0.0) of this package.

Laravel wrapper for amazon creatorsapi-php-sdk

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/cre8-it/creatorsapi-laravel

v1.0.0 2026-02-13 12:11 UTC

This package is not auto-updated.

Last update: 2026-02-14 10:16:31 UTC


README

Small Laravel wrapper around the Amazon Creators API PHP SDK.

Requirements

  • PHP 8.1+
  • Laravel 9-12

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);
}