knawat / suppliers-sdk
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
This package is auto-updated.
Last update: 2025-04-13 18:48:41 UTC
README
Knawat Supply API allows you to list your products on Knawat and get purchase orders, it's also allow you to set order status and shipping tracking number. ## Getting Started In Knawat each supplier has a different consumerKey
and consumerSecret
, which you can get from your account manager. You need those keys for API authorization. Knawat suppliers npm package: . ## Support and Chat We are happy to receive your questions. click here to chat with us. ## Errors Handling This API uses standard HTTP status codes to indicate the status of a response. There are two main categories of error responses. Each have a different response payload structure. * Simple errors * Detailed errors # Simple errors | Name | Code | Description | | -------- | -------- | -------- | | Bad request | 400 | The request was unacceptable | | Unauthorized | 401 | The request has not been applied because it lacks valid authentication credentials for the target resource. | | Forbidden | 403 | The server understood the request, but is refusing to fulfill it | | Not Found | 404 | The server has not found anything matching the request URI | | Not acceptable | 406 | The server is unable to return a response in the format that was requested by the client | | Unsupported Media Type | 415 | The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method | | Too many requests | 429 | Too many requests hit the API too quickly | | Server error | 500 | A technical error occurred | # Detailed errors | Name | Code | Description | | -------- | -------- | -------- | | Un-processable entity | 422 | The server understands the content type of the request entity, and the syntax of the request entity is correct, but was unable to process the contained instructions. |
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.1.0
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen For more information, please visit https://developer.knawat.com
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new Swagger\Client\Api\AuthApi( // 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() ); $body = new \stdClass; // object | try { $result = $apiInstance->tokenPost($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AuthApi->tokenPost: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://dev.suppliers.knawat.io/api/
Class | Method | HTTP request | Description |
---|---|---|---|
AuthApi | tokenPost | POST /token | Get token for supplier |
CategoriesApi | catalogCategoriesGet | GET /catalog/categories | Get list of categories |
ImporterApi | importProductsGet | GET /import/products | List files |
ImporterApi | importProductsPost | POST /import/products | Import products |
OrdersApi | ordersGet | GET /orders | Get list of orders |
ProductsApi | catalogProductsGet | GET /catalog/products | Get list of products |
ProductsApi | catalogProductsPost | POST /catalog/products | Create a product |
ProductsApi | catalogProductsPut | PUT /catalog/products | Update products |
ProductsApi | catalogProductsSkuGet | GET /catalog/products/{sku} | Get product by id |
ProductsApi | catalogProductsSkuPut | PUT /catalog/products/{sku} | Update a product |
ProductsApi | catalogVariationsPut | PUT /catalog/variations | Update quantity of variation |
SuppliersApi | suppliersEmailUsersGet | GET /suppliers/{email}/users | Get supplier(s) by email |
SuppliersApi | suppliersGet | GET /suppliers | Get list of suppliers |
SuppliersApi | suppliersIdGet | GET /suppliers/{id} | Get supplier by id |
SuppliersApi | suppliersIdKeysGet | GET /suppliers/{id}/keys | Get supplier keys |
SuppliersApi | suppliersPost | POST /suppliers | Create a supplier |
SuppliersApi | suppliersPut | PUT /suppliers | Update a supplier |
WeightRulesApi | weightRulesGet | GET /weight_rules | Get list of Weight Rules |
WeightRulesApi | weightRulesPost | POST /weight_rules | Create a WeightRule |
WeightRulesApi | weightRulesWeightRuleIdDelete | DELETE /weight_rules/{weightRuleId} | Delete a WeightRule |
WeightRulesApi | weightRulesWeightRuleIdPut | PUT /weight_rules/{weightRuleId} | Update a WeightRule |
Documentation For Models
- Auth
- AuthUser
- Body
- Category
- Created
- Import
- ImportFile
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse20011
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse2006
- InlineResponse2007
- InlineResponse2008
- InlineResponse2009
- InlineResponse500
- InlineResponse500Errors
- Order
- Price
- Product
- ProductAttributes
- ProductBrand
- ProductCategories
- ProductDescription
- ProductDescriptionShort
- ProductName
- ProductOptions
- ProductVariations
- Sort
- Stock
- Supplier
- SupplierAddress
- SupplierBank
- SupplierBilling
- SupplierBillingAddress
- SupplierKeys
- SupplierUsers
- WeightRule
Documentation For Authorization
basicAuth
- Type: HTTP basic authentication
bearerAuth
- Type: HTTP bearer authentication