jacob-hyde/printify

Printify PHP SDK

v1.0 2020-10-05 18:46 UTC

This package is auto-updated.

Last update: 2024-05-22 02:31:36 UTC


README

Basic PHP wrapper for working with Printify API. API endpoint documentation can be found here: https://developers.printify.com/

Installation

composer required jacob-hyde/printify

Check out example and test directories for more specific usage examples.

Basic Usage

Create a new instance of the Printify API and pass it to the endpoint class. For example the Catalog:

use Printify\PrintifyApiClient;
use Printify\PrintifyCatalog;

$printify_api = new PrintifyApiClient(<Shop Access Token>);
$printify_catalog = new PrintifyCatalog($printify_api);
$catalog_items = $printify_catalog->all();

Shop Based Endpoints

For shop based endpoints, pass along the shop ID in the endpoint constructor. For Example:

use Printify\PrintifyOrders;
$printify_orders = new PrintifyOrders($printify_api, <Shop ID>);
$orders = $printify_orders->all();

Endpoints that need a shop ID:

  • Products
  • Orders
  • Uploads
  • Webhooks

Endpoints