Giter Site home page Giter Site logo

ekm-php's Introduction

ekm-php

Our new API allows partners to build significantly better integrations with the EKM platform.

To try out the below endpoints, or for full up to date representations of the request / response models, please see the swagger page. (We display examples here, but the swagger page is guaranteed to show the complete model.)

To keep up to date with the latest updates, please see our RSS feed or the partner dashboard.

For more information, please visit https://ekm.com.

Installation & Usage

Requirements

PHP 7.3 and later. Should also work with PHP 8.0 but has not been tested.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/mrstebo/ekm-php.git"
    }
  ],
  "require": {
    "mrstebo/ekm-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/ekm-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure OAuth2 access token for authorization: Bearer
$config = EkmPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new EkmPHP\Api\CategoriesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$v1AddCategory = new \EkmPHP\Models\V1AddCategory(); // \EkmPHP\Models\V1AddCategory

try {
    $result = $apiInstance->categoriesCreate($v1AddCategory);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CategoriesApi->categoriesCreate: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.ekm.net

Class Method HTTP request Description
CategoriesApi categoriesCreate POST /api/v1/categories Add a category
CategoriesApi categoriesDelete DELETE /api/v1/categories/{id} Delete a category
CategoriesApi categoriesDeleteCategoryManaged DELETE /api/v1/categories/{id}/categorymanaged/{childCategoryId} Stops a category from being managed by another category
CategoriesApi categoriesGet GET /api/v1/categories/{id} Get a category
CategoriesApi categoriesGetAll GET /api/v1/categories Get a paginated set of categories
CategoriesApi categoriesGetCategoryFilters GET /api/v1/categories/{id}/filters
CategoriesApi categoriesSearch GET /api/v1/categories/search Searches categories based on search criteria
CategoriesApi categoriesSetCategoryManaged POST /api/v1/categories/{id}/categorymanaged/{childCategoryId} Set a category to be managed by another category
CategoriesApi categoriesSubcategories GET /api/v1/categories/{id}/subcategories Get a paginated set of subcategories
CategoriesApi categoriesUpdate PUT /api/v1/categories/{id} Update a category
CategoriesApi categoriesUpdateCategoryFilters PUT /api/v1/categories/{id}/filters
CurrencyApi currencyGetCurrency GET /api/v1/settings/currency Gets the current Currency Settings
CustomerAddressesApi customerAddressesCreate POST /api/v1/customers/{customerId}/addresses Add a Customer Address
CustomerAddressesApi customerAddressesDelete DELETE /api/v1/customers/{customerId}/addresses/{addressId} Delete a Customer Address
CustomerAddressesApi customerAddressesGetAll GET /api/v1/customers/{customerId}/addresses Get a paginated set of Customer Addresses
CustomerAddressesApi customerAddressesGetById GET /api/v1/customers/{customerId}/addresses/{addressId} Get a single Customer Address by Id
CustomerAddressesApi customerAddressesSearch GET /api/v1/customers/{customerId}/addresses/search Searches customer addresses based on search criteria
CustomerAddressesApi customerAddressesUpdate PUT /api/v1/customers/{customerId}/addresses/{addressId} Update a Customer Address
CustomersApi customersCreate POST /api/v1/customers Add a customer
CustomersApi customersDelete DELETE /api/v1/customers/{id} Delete a Customer
CustomersApi customersGetAll GET /api/v1/customers Get a paginated set of Customers
CustomersApi customersGetById GET /api/v1/customers/{id} Get a single Customer by Id
CustomersApi customersSearch GET /api/v1/customers/search Searches customers based on search criteria
CustomersApi customersUpdate PUT /api/v1/customers/{id} Update a Customer
DomainsApi domainsGetPrimaryDomain GET /api/v1/settings/domains Get the current Primary Domain
OrderStatusesApi orderStatusesGetOrderStatuses GET /api/v1/settings/orderstatuses Get the current Order Statuses
OrdersApi ordersGetAll GET /api/v2/orders Get a paginated set of orders
OrdersApi ordersGetById GET /api/v2/orders/{id} Get an order by ID
OrdersApi ordersGetCustomFields GET /api/v2/orders/{id}/customFields Get custom fields for an order
OrdersApi ordersGetItems GET /api/v2/orders/{id}/items Get an order's items
OrdersApi ordersGetOrderItemById GET /api/v2/orders/{id}/items/{itemId} Get a specific item from an order
OrdersApi ordersSearch GET /api/v2/orders/search Searches orders based on search criteria
OrdersApi ordersUpdateDeliveryTracking PUT /api/v2/orders/{id}/deliveryTracking Updates delivery tracking info for an order
OrdersApi ordersUpdateInternalNotes PUT /api/v2/orders/{id}/internalNotes Updates internal notes for an order
OrdersApi ordersUpdateStatus PUT /api/v2/orders/{id}/status Updates the status of an order
PlansApi plansGetAll GET /api/v1/settings/plans Get all plans
PlansApi plansGetById GET /api/v1/settings/plans/{id} Get a plan by id
PlansApi plansGetCurrent GET /api/v1/settings/plans/current Get the current users plan
ProductAttributeItemsApi productAttributeItemsCreate POST /api/v1/products/{id}/attributes Add a attribute item to a product
ProductAttributeItemsApi productAttributeItemsGet GET /api/v1/products/{id}/attributes/{attribute_id} Get a product attribute item
ProductAttributeItemsApi productAttributeItemsGetAll GET /api/v1/products/{id}/attributes Get all of a products attribute items
ProductAttributeItemsApi productAttributeItemsUpdate PUT /api/v1/products/{id}/attributes/{attribute_id} Update a product attribute item
ProductAttributesApi productAttributesCreate POST /api/v1/settings/productattributes Add a product attribute
ProductAttributesApi productAttributesDelete DELETE /api/v1/settings/productattributes/{attribute_key} Delete a product attribute
ProductAttributesApi productAttributesGet GET /api/v1/settings/productattributes/{attribute_key} Get a product attribute
ProductAttributesApi productAttributesGetAll GET /api/v1/settings/productattributes Get all product attributes
ProductAttributesApi productAttributesUpdate PUT /api/v1/settings/productattributes/{attribute_key} Update a product attribute
ProductMediaApi productMediaDelete DELETE /api/v2/products/{id}/media/{position} Delete a product's media by position
ProductMediaApi productMediaGetProductMedia GET /api/v2/products/{id}/media Get all of a product's associated media
ProductMediaApi productMediaUpdateProductMedia POST /api/v2/products/{id}/media/{position} Update a product's media by position
ProductOptionItemsApi productOptionItemsCreate POST /api/v1/products/{id}/options/{optionId}/items Add an item to a product option
ProductOptionItemsApi productOptionItemsDelete DELETE /api/v1/products/{id}/options/{optionId}/items/{optionItemId} Delete an option item
ProductOptionItemsApi productOptionItemsUpdate PUT /api/v1/products/{id}/options/{optionId}/items/{optionItemId} Update a product option item
ProductOptionsApi productOptionsCreate POST /api/v1/products/{id}/options Add an option to a product
ProductOptionsApi productOptionsDelete DELETE /api/v1/products/{id}/options/{optionId} Delete an option
ProductOptionsApi productOptionsGet GET /api/v1/products/{id}/options/{optionId} Get a product option
ProductOptionsApi productOptionsGetAll GET /api/v1/products/{id}/options Get a products options
ProductOptionsApi productOptionsUpdate PUT /api/v1/products/{id}/options/{optionId} Update a product option
ProductStockApi productStockGet GET /api/v1/products/{id}/stock Get the stock for a product
ProductStockApi productStockUpdate PUT /api/v1/products/{id}/stock Set the stock for a product
ProductVariantStockApi productVariantStockGet GET /api/v1/products/{id}/variants/{variantId}/stock Get a product variant stock
ProductVariantStockApi productVariantStockUpdate PUT /api/v1/products/{id}/variants/{variantId}/stock Update a product variant stock
ProductVariantsApi productVariantsAssignImageByUrlToProduct POST /api/v1/products/{id}/variants/{variantId}/images/{imageNumber} Set a variants image to a URL
ProductVariantsApi productVariantsCreate POST /api/v1/products/{id}/variants Add a variant to a product
ProductVariantsApi productVariantsDelete DELETE /api/v1/products/{id}/variants/{variantId} Delete a variant
ProductVariantsApi productVariantsGet GET /api/v1/products/variants/{variantId} Get a product variant
ProductVariantsApi productVariantsGetAll GET /api/v1/products/{id}/variants Get a products variants
ProductVariantsApi productVariantsGetProductImages GET /api/v1/products/{id}/variants/{variantId}/images Get a variant's images.
ProductVariantsApi productVariantsGetProductVariant GET /api/v1/products/{id}/variants/{variantId} Get a product variant
ProductVariantsApi productVariantsSearch GET /api/v1/variants/search Searches variants based on search criteria
ProductVariantsApi productVariantsUpdate PUT /api/v1/products/{id}/variants/{variantId} Update a product variant
ProductsApi productsAssignImageByUrlToProduct POST /api/v1/products/{id}/images/{imageNumber} Assign an image by Url to a product
ProductsApi productsCreate POST /api/v1/products Add a Product
ProductsApi productsDelete DELETE /api/v1/products/{id} Delete a Product
ProductsApi productsDeleteCategoryManaged DELETE /api/v1/products/{id}/categorymanaged/{categoryId} Stops a product from being managed by another category
ProductsApi productsGet GET /api/v1/products/{id} Get a product
ProductsApi productsGetAll GET /api/v1/products Get a paginated set of products
ProductsApi productsGetProductImages GET /api/v1/products/{id}/images Get a product's images.
ProductsApi productsSearch GET /api/v1/products/search Searches products based on search criteria
ProductsApi productsSetCategoryManaged POST /api/v1/products/{id}/categorymanaged/{categoryId} Set a product to be managed by another category
ProductsApi productsUpdate PUT /api/v1/products/{id} Update a Product
ShopInformationApi shopInformationGet GET /api/v1/settings/shop_information Get information about the shop
TaxApi taxCreateTaxRate POST /api/v1/settings/tax/rates Add a Tax Rate
TaxApi taxDeleteTaxRate DELETE /api/v1/settings/tax/rates/{id} Delete a Tax Rate
TaxApi taxGetTaxRate GET /api/v1/settings/tax/rates/{id} Get a specific Tax Rate
TaxApi taxGetTaxRates GET /api/v1/settings/tax/rates Get a list of Tax Rates
TaxApi taxGetTaxSettings GET /api/v1/settings/tax Get the current Tax Settings
TaxApi taxUpdateTaxRate PUT /api/v1/settings/tax/rates/{id} Update a Tax Rate
TaxApi taxUpdateTaxSettings PUT /api/v1/settings/tax Update the current Tax Settings
WebPageGroupsApi webPageGroupsCreate POST /api/v1/web_page_groups Create a web page group
WebPageGroupsApi webPageGroupsDelete DELETE /api/v1/web_page_groups/{id} Delete a web page group
WebPageGroupsApi webPageGroupsGet GET /api/v1/web_page_groups/{id} Get a web page group
WebPageGroupsApi webPageGroupsGetAll GET /api/v1/web_page_groups Get a paginated set of web page groups
WebPageGroupsApi webPageGroupsUpdate PUT /api/v1/web_page_groups/{id} Update a specified web page group
WebPagesApi webPagesCreate POST /api/v1/web_pages Create a web page
WebPagesApi webPagesDelete DELETE /api/v1/web_pages/{id} Delete a web page by ID
WebPagesApi webPagesGet GET /api/v1/web_pages/{id} Get a web page
WebPagesApi webPagesGetAll GET /api/v1/web_pages Get a paginated set of web pages
WebPagesApi webPagesUpdate PUT /api/v1/web_pages/{id} Update a specified web page
WebhooksApi webhooksDelete DELETE /api/v2/Webhooks/{id} Unsubscribe from a webhook
WebhooksApi webhooksGet GET /api/v2/Webhooks/{id} Get a specific subscription
WebhooksApi webhooksGetAll GET /api/v2/Webhooks/webhooks Get list of existing subscriptions
WebhooksApi webhooksPost POST /api/v2/Webhooks Subscribe to a webhook
WebhooksApi webhooksPut PUT /api/v2/Webhooks/{id} Update a webhook subscription

Models

Authorization

Bearer

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://api.ekm.net/connect/authorize
  • Scopes:
    • openid: Access a shops identity token.
    • profile: Read a user's details. (name, email, etc)
    • tempest.internal.orders.read: Internal - Read a shop's orders.
    • tempest.customers.read: Read a shop's customers.
    • tempest.customers.write: Modify a shop's customers.
    • tempest.Guests.read: Read a shop's Guests.
    • tempest.Guests.write: Modify a shop's Guests.
    • tempest.orders.read: Read a shop's orders.
    • tempest.orders.write: Modify a shop's orders.
    • tempest.orders.customers.notes.read: Read a shop's order customer notes.
    • tempest.orders.customers.notes.write: Modify a shop's order customer notes.
    • tempest.products.read: Read a shop's products.
    • tempest.products.write: Modify a shop's products.
    • tempest.categories.read: Read a shop's categories.
    • tempest.categories.write: Modify a shop's categories.
    • tempest.settings.orderstatuses.read: Read a shop's order statuses.
    • tempest.settings.domains.read: Read a shop's domains.
    • tempest.settings.accountdetails.read: Read a shop's account details.
    • tempest.settings.tax.read: Read a shop's tax settings.
    • tempest.settings.tax.write: Write a shop's tax settings.
    • tempest.settings.currency.read: Read a shop's currency settings.
    • tempest.cartsessions.read: Read a shop's cart sessions.
    • tempest.cartsessions.write: Modify a shop's cart sessions.
    • tempest.cart.read: Read a shop's cart
    • tempest.cart.write: Modify a shop's cart.

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

[email protected]

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: Latest
    • Package version: 0.0.4
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

ekm-php's People

Contributors

mrstebo avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.