tcdev/ship-station

An updated and maintained PHP Wrapper for ShipStation's rest api, forked from michaelb/ship-station, docs @ https://shipstation.docs.apiary.io/

v2.0.0 2023-10-25 12:42 UTC

This package is auto-updated.

Last update: 2024-10-25 17:12:18 UTC


README

Install

composer require zack6849/ship-station

Docs

Using ShipStationApi

use MichaelB\ShipStation\ShipStationApi;

$apiKey = ''; // Your ShipStation Api Key
$apiSecret = ''; // Your ShipStation Api Secret
$options = []; // Options to be merged into the normal GuzzleHttp\Client options

// ShipStationApi Extends GuzzleHttp\Client
$shipstation = new ShipStationApi($apiKey, $apiSecret, $options);

/*
 * Get a service instance
 */
 
// Orders
$orderService = $shipstation->orders;

// Products
$products = $shipstation->products;

// ...

/*
 * Use the service
 */
$order = $orderService->getOrder('1234');

// All service methods return a GuzzleHttp\Psr7\Response object
$json = $order->getBody(); // { 'order': {...} }
$status = $order->getStatusCode(); // 200