Skip to content

Latest commit

 

History

History
164 lines (112 loc) · 5.08 KB

ProductsApi.md

File metadata and controls

164 lines (112 loc) · 5.08 KB

Swagger\Client\ProductsApi

All URIs are relative to https://public-api.iqxamplify.com/V1

Method HTTP request Description
createOrUpdateProduct POST /products/ Create or Update a product
findProducts GET /products/ Retrieve all products
findProductsById GET /products/{id} Retrieve a single product by id

createOrUpdateProduct

\Swagger\Client\Model\Product createOrUpdateProduct($product)

Create or Update a product

Create or Update a product

Example

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

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('authorization', 'YOUR_API_KEY');
Swagger\Client\Configuration::getDefaultConfiguration()->setSandboxMode(true);
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ProductsApi();
$product = new \Swagger\Client\Model\Product(); // \Swagger\Client\Model\Product | Add or update products details

try {
    $result = $api_instance->createOrUpdateProduct($product);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->createOrUpdateProduct: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
product \Swagger\Client\Model\Product Add or update products details

Return type

\Swagger\Client\Model\Product

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

findProducts

\Swagger\Client\Model\Products findProducts($page)

Retrieve all products

Retrieve all products

Example

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

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('authorization', 'YOUR_API_KEY');
Swagger\Client\Configuration::getDefaultConfiguration()->setSandboxMode(true);
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ProductsApi();
$page = 3.4; // float | The page number ro return

try {
    $result = $api_instance->findProducts($page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->findProducts: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
page float The page number ro return [optional]

Return type

\Swagger\Client\Model\Products

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

findProductsById

\Swagger\Client\Model\Product findProductsById($id)

Retrieve a single product by id

Retrieve a single product by id

Example

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

// Configure API key authorization: api_key
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('authorization', 'YOUR_API_KEY');
Swagger\Client\Configuration::getDefaultConfiguration()->setSandboxMode(true);
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\ProductsApi();
$id = "id_example"; // string | ID of the product to get

try {
    $result = $api_instance->findProductsById($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProductsApi->findProductsById: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id string ID of the product to get

Return type

\Swagger\Client\Model\Product

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]