imn/api-php-client

1.1 2023-04-26 09:43 UTC

This package is not auto-updated.

Last update: 2024-09-25 16:56:25 UTC


README

IMN系统REST API ## 概述 REST API提供了读取和写入IMN数据的编程访问。基本上,使用此API,您将能够执行像在https://go.imn.io浏览器上一样的一切!主要功能包括:- 注册和管理您的商户账户- 声明您的源市场以获取您的报价- 配置您的市场API凭证- 定义您想要进入的目标市场,然后您将能够配置:- 定价设置- 配送设置- ...等等!## 注意事项### API速率限制 - IMN REST API限制为每分钟100次调用。### 媒体类型请求和响应的默认媒体类型为application/json。如有说明,某些操作支持其他内容类型。如果特定操作未提及其他内容类型,则媒体类型为application/json。### 必需内容类型请求和响应的必需和默认编码为UTF8。### 必需日期时间格式所有日期时间都按ISO 8601格式格式化:2014-06-24T16:25:00Z。### 基础URL IMN API订单管理REST API的基础URL符合以下模板。https://api.imn.io所有由IMN API返回的URL都相对于此基础URL,所有对REST API的请求都必须使用此基础URL模板。您可以在https://api-docs.imn.io/swagger-ui\\\\测试我们的API。您可以在gitter, #IMN/API联系我们

此PHP包由Swagger Codegen项目自动生成

  • API版本:1.0
  • 构建包:io.swagger.codegen.languages.PhpClientCodegen

要求

PHP 5.5及更高版本

安装与使用

Composer

要使用Composer安装绑定,请将以下内容添加到composer.json

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

然后运行composer install

手动安装

下载文件并包含autoload.php

    require_once('/path/to/SwaggerClient-php/vendor/autoload.php');

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门

请按照安装过程进行操作,然后运行以下命令

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

$apiInstance = new IMN\Swagger\Client\Api\MerchantAPIListOfValuesLOVApi(
    // 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()
);
$list_name = "list_name_example"; // string | The list of value name your want to get
$accept_language = array("accept_language_example"); // string[] | Indicates that the client accepts the following languages.
$if_none_match = "if_none_match_example"; // string | ETag value to identify the last known version of requested resource.\\ To avoid useless exchange, we recommend you to indicate the ETag you previously got from this operation.\\ If the ETag value does not match the response will be 200 to give you a new content, otherwise the response will be: 304 Not Modified, without any content.\\ For more details go to this link: http://tools.ietf.org/html/rfc7232#section-2.3

try {
    $result = $apiInstance->getUserListOfValues($list_name, $accept_language, $if_none_match);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MerchantAPIListOfValuesLOVApi->getUserListOfValues: ', $e->getMessage(), PHP_EOL;
}

?>

API端点文档

所有URI均相对于https://api.imn.io

模型文档

授权文档

api_key

  • 类型: API密钥
  • API密钥参数名称: Ocp-Apim-Subscription-Key
  • 位置: HTTP头

作者

support@imn.io