Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ShopifyExtras/PHP-Shopify-API-Wrapper
Shopify PHP (Guzzle) API Wrapper
https://github.com/ShopifyExtras/PHP-Shopify-API-Wrapper
Last synced: about 1 month ago
JSON representation
Shopify PHP (Guzzle) API Wrapper
- Host: GitHub
- URL: https://github.com/ShopifyExtras/PHP-Shopify-API-Wrapper
- Owner: ShopifyExtras
- License: mit
- Created: 2014-12-04T09:35:19.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-09-24T17:50:39.000Z (about 4 years ago)
- Last Synced: 2024-08-02T12:22:14.557Z (4 months ago)
- Language: PHP
- Homepage: http://www.zapiet.com/
- Size: 912 KB
- Stars: 119
- Watchers: 15
- Forks: 68
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-shopify - ShopifyExtras/PHP-Shopify-API-Wrapper - Guzzle-based API client. (Libraries / PHP)
README
# Shopify API Wrapper
By [Zapiet.com](http://www.zapiet.com) - Zapiet - Creators of the Store Pickup + Delivery app.### Installing via Composer
The recommended way to install the wrapper is through
[Composer](http://getcomposer.org).```bash
# Install Composer
curl -sS https://getcomposer.org/installer | php
```Next, run the Composer command to install the latest stable version of the wrapper:
```bash
composer require shopifyextras/shopify-php-api-wrapper
```
After installing, you need to require Composer's autoloader:```php
require 'vendor/autoload.php';
```### Getting Started
First you will need to initialise the client like this:
```php
$client = new \Shopify\Client([
"shopUrl" => $shopUrl,
"X-Shopify-Access-Token" => $accessToken
]);
```Then you can begin making requests like shown below. Please note that the list of requests below is not complete. All endpoints are available just take a look in the /src/resources folder for reference.
### Orders
```php
// Get a list of all orders.
$client->getOrders();// Get a specific order.
$client->getOrder(['id' => $order_id]);// Get Order ID and Total Price for a specific order.
$client->getOrder(['id' => $order_id,
'fields' => 'id,total_price']);
```### Products
```php
// Get a list of all products.
$client->getProducts();// Get a specific product.
$client->getProduct(["id" => $product_id]);
```### Product Variants
```php
// Get a list of all variants for a specific product.
$client->getProductVariants(["id" => $product_id]);// Get a specific product variant.
$client->getProductVariant(["id" => $variant_id]);// Get metafields for a specific variant.
$client->getProductVariantMetafields(["id" => $variant_id]);
```### Bugs & Issues
If you spot any bugs, please report it using the issue tracker. If you would like to contribute to the project please feel free to make your amends and submit a pull request.### Professional Services
Unfortunately we are unable to provide free technical support for the wrapper. If you require this kind of help then please contact us by emailing [[email protected]](mailto:[email protected]).Test the API at [RapidAPI](https://rapidapi.com/package/Shopify/functions?utm_source=ShopifyGitHub&utm_medium=button).