All URIs are relative to https://api.swappy.com/
| Method | HTTP request | Description |
|---|---|---|
| createBulkJob | POST /v1/bulkjobs | |
| getBulkJob | GET /v1/bulkjobs/{id} | |
| getBulkJobResult | GET /v1/bulkjobs/{id}/results |
\Swappy\Api\Model\BulkJob createBulkJob($body, $language)
Start a bulk product job
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth
Swappy\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swappy\Api\BulkApi();
$body = array(new Product()); // \Swappy\Api\Model\Product[] | Product list to be uploaded
$language = "language_example"; // string | Language for the response
try {
$result = $api_instance->createBulkJob($body, $language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BulkApi->createBulkJob: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| body | \Swappy\Api\Model\Product[] | Product list to be uploaded | |
| language | string | Language for the response | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swappy\Api\Model\BulkJob getBulkJob($id, $if_none_match, $if_modified_since, $language)
Get infos about a job
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth
Swappy\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swappy\Api\BulkApi();
$id = 56; // int | Product ID
$if_none_match = "if_none_match_example"; // string | Etag, will return `304 Not Modified` if content hasn't changed
$if_modified_since = new \DateTime(); // \DateTime | Will return `304 Not Modified` if content hasn't changed
$language = "language_example"; // string | Language for the response
try {
$result = $api_instance->getBulkJob($id, $if_none_match, $if_modified_since, $language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BulkApi->getBulkJob: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Product ID | |
| if_none_match | string | Etag, will return `304 Not Modified` if content hasn't changed | [optional] |
| if_modified_since | \DateTime | Will return `304 Not Modified` if content hasn't changed | [optional] |
| language | string | Language for the response | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swappy\Api\Model\BulkJobResult[] getBulkJobResult($id, $if_none_match, $if_modified_since, $language)
Get results for a job
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: oauth
Swappy\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new Swappy\Api\BulkApi();
$id = 56; // int | Product ID
$if_none_match = "if_none_match_example"; // string | Etag, will return `304 Not Modified` if content hasn't changed
$if_modified_since = new \DateTime(); // \DateTime | Will return `304 Not Modified` if content hasn't changed
$language = "language_example"; // string | Language for the response
try {
$result = $api_instance->getBulkJobResult($id, $if_none_match, $if_modified_since, $language);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BulkApi->getBulkJobResult: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Product ID | |
| if_none_match | string | Etag, will return `304 Not Modified` if content hasn't changed | [optional] |
| if_modified_since | \DateTime | Will return `304 Not Modified` if content hasn't changed | [optional] |
| language | string | Language for the response | [optional] |
\Swappy\Api\Model\BulkJobResult[]
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]