Skip to content

Latest commit

 

History

History
157 lines (112 loc) · 6.21 KB

BatchApi.md

File metadata and controls

157 lines (112 loc) · 6.21 KB

OpenAPI\Client\BatchApi

All URIs are relative to https://api.api2cart.com/v1.1, except if the operation defines another base path.

Method HTTP request Description
batchJobList() GET /batch.job.list.json batch.job.list
batchJobResult() GET /batch.job.result.json batch.job.result

batchJobList()

batchJobList($count, $page_cursor, $ids, $created_from, $created_to, $processed_from, $processed_to, $response_fields): \OpenAPI\Client\Model\ModelResponseBatchJobList

batch.job.list

Get list of recent jobs

Example

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


// Configure API key authorization: StoreKeyAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('x-store-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-store-key', 'Bearer');

// Configure API key authorization: ApiKeyAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\BatchApi(
    // 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
);
$count = 20; // int | This parameter sets the entity amount that has to be retrieved. Max allowed count=250
$page_cursor = ; // string | Used to retrieve entities via cursor-based pagination (it can't be used with any other filtering parameter)
$ids = 24,25; // string | Filter batch jobs by ids
$created_from = 2010-07-29 13:45:52; // string | Retrieve entities from their creation date
$created_to = 2100-08-29 13:45:52; // string | Retrieve entities to their creation date
$processed_from = 2100-08-29 13:45:52; // string | Retrieve entities according to their processing datetime
$processed_to = 2100-08-29 13:45:52; // string | Retrieve entities according to their processing datetime
$response_fields = {result}; // string | Set this parameter in order to choose which entity fields you want to retrieve

try {
    $result = $apiInstance->batchJobList($count, $page_cursor, $ids, $created_from, $created_to, $processed_from, $processed_to, $response_fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BatchApi->batchJobList: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
count int This parameter sets the entity amount that has to be retrieved. Max allowed count=250 [optional] [default to 10]
page_cursor string Used to retrieve entities via cursor-based pagination (it can't be used with any other filtering parameter) [optional]
ids string Filter batch jobs by ids [optional]
created_from string Retrieve entities from their creation date [optional]
created_to string Retrieve entities to their creation date [optional]
processed_from string Retrieve entities according to their processing datetime [optional]
processed_to string Retrieve entities according to their processing datetime [optional]
response_fields string Set this parameter in order to choose which entity fields you want to retrieve [optional] [default to '{return_code,return_message,pagination,result}']

Return type

\OpenAPI\Client\Model\ModelResponseBatchJobList

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

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

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

batchJobResult()

batchJobResult($id): \OpenAPI\Client\Model\ResponseBatchJobResult

batch.job.result

Get job result data

Example

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


// Configure API key authorization: StoreKeyAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('x-store-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-store-key', 'Bearer');

// Configure API key authorization: ApiKeyAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\BatchApi(
    // 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
);
$id = 10; // string | Entity id

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

Parameters

Name Type Description Notes
id string Entity id

Return type

\OpenAPI\Client\Model\ResponseBatchJobResult

Authorization

StoreKeyAuth, ApiKeyAuth

HTTP request headers

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

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