Skip to content

Latest commit

 

History

History
246 lines (164 loc) · 8.19 KB

UtilitiesApi.md

File metadata and controls

246 lines (164 loc) · 8.19 KB

Walmart\Apis\MP\US\UtilitiesApi

All URIs are relative to https://marketplace.walmartapis.com, except if the operation defines another base path.

Method HTTP request Description
getApiPlatformStatus() GET /v3/utilities/apiStatus API Platform Status
getCategories() GET /v3/utilities/taxonomy/departments/{departmentId} All Categories
getDepartmentList() GET /v3/utilities/taxonomy/departments All Departments
getTaxonomyResponse() GET /v3/utilities/taxonomy Taxonomy by spec

getApiPlatformStatus()

getApiPlatformStatus(): \Walmart\Models\MP\US\Utilities\StatusAPIResponse

API Platform Status

Get all marketplace Apis status

Example

<?php
use Walmart\Configuration;
use Walmart\Enums\Country;
use Walmart\Walmart;

require_once __DIR__ . '/vendor/autoload.php';

$config = new Walmart\Configuration([
    'clientId' => 'CLIENT_ID',          // May not be necessary for all endpoints, particularly outside the US
    'clientSecret' => 'CLIENT_SECRET',  // Ditto above
    'country' => Country::US,           // Default Country::US if not set
]);

$api = Walmart::marketplace($config)->utilities();


try {
    $result = $api->getApiPlatformStatus();
    print_r($result);
} catch (Exception $e) {
    echo "Exception when calling UtilitiesApi->getApiPlatformStatus: {$e->getMessage()}\n";
}

Parameters

This endpoint does not need any parameter.

Return type

\Walmart\Models\MP\US\Utilities\StatusAPIResponse

Authorization

This endpoint requires the following authorization methods:

  • accessToken: Header authentication with a Walmart access token, which is automatically generated using your Client ID and Client Secret. The token is valid for 15 minutes, and will be passed in the WM_SEC.ACCESS_TOKEN header

See the Authorization section of the README for more information.

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

getCategories()

getCategories($departmentId): \Walmart\Models\MP\US\Utilities\GetCategories

All Categories

Get list of categories for a specific department

Example

<?php
use Walmart\Configuration;
use Walmart\Enums\Country;
use Walmart\Walmart;

require_once __DIR__ . '/vendor/autoload.php';

$config = new Walmart\Configuration([
    'clientId' => 'CLIENT_ID',          // May not be necessary for all endpoints, particularly outside the US
    'clientSecret' => 'CLIENT_SECRET',  // Ditto above
    'country' => Country::US,           // Default Country::US if not set
]);

$api = Walmart::marketplace($config)->utilities();

$departmentId = 'departmentId_example'; // string | departmentId

try {
    $result = $api->getCategories($departmentId);
    print_r($result);
} catch (Exception $e) {
    echo "Exception when calling UtilitiesApi->getCategories: {$e->getMessage()}\n";
}

Parameters

Name Type Description Notes
departmentId string departmentId

Return type

\Walmart\Models\MP\US\Utilities\GetCategories

Authorization

This endpoint requires the following authorization methods:

  • accessToken: Header authentication with a Walmart access token, which is automatically generated using your Client ID and Client Secret. The token is valid for 15 minutes, and will be passed in the WM_SEC.ACCESS_TOKEN header

See the Authorization section of the README for more information.

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

getDepartmentList()

getDepartmentList(): \Walmart\Models\MP\US\Utilities\GetDepartmentList

All Departments

Get list of departments

Example

<?php
use Walmart\Configuration;
use Walmart\Enums\Country;
use Walmart\Walmart;

require_once __DIR__ . '/vendor/autoload.php';

$config = new Walmart\Configuration([
    'clientId' => 'CLIENT_ID',          // May not be necessary for all endpoints, particularly outside the US
    'clientSecret' => 'CLIENT_SECRET',  // Ditto above
    'country' => Country::US,           // Default Country::US if not set
]);

$api = Walmart::marketplace($config)->utilities();


try {
    $result = $api->getDepartmentList();
    print_r($result);
} catch (Exception $e) {
    echo "Exception when calling UtilitiesApi->getDepartmentList: {$e->getMessage()}\n";
}

Parameters

This endpoint does not need any parameter.

Return type

\Walmart\Models\MP\US\Utilities\GetDepartmentList

Authorization

This endpoint requires the following authorization methods:

  • accessToken: Header authentication with a Walmart access token, which is automatically generated using your Client ID and Client Secret. The token is valid for 15 minutes, and will be passed in the WM_SEC.ACCESS_TOKEN header

See the Authorization section of the README for more information.

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

getTaxonomyResponse()

getTaxonomyResponse($feedType, $version): \Walmart\Models\MP\US\Utilities\TaxonomyResponseDTO

Taxonomy by spec

The Taxonomy by Item spec API exposes the category taxonomy that Walmart.com uses to categorize items for each Item spec version. It returns a list of all Categories and Sub-categories that are available on Walmart.com for the Item spec version you specify. You can specify the feedType and version for these available Item specs. Make sure to specify the corresponding version that is available for that feed type: * Item spec 3.2 feed type: item * Item spec 4.0 feed types: MP_ITEM, MP_WFS_ITEM, or MP_MAINTENANCE * Item spec 4.1 feed types: MP_WFS_ITEM, or MP_MAINTENANCE * Item spec 4.2 feed type: MP_ITEM or MP_WFS_ITEM * Item spec 4.3 feed type: MP_ITEM or MP_MAINTENANCE

Example

<?php
use Walmart\Configuration;
use Walmart\Enums\Country;
use Walmart\Walmart;

require_once __DIR__ . '/vendor/autoload.php';

$config = new Walmart\Configuration([
    'clientId' => 'CLIENT_ID',          // May not be necessary for all endpoints, particularly outside the US
    'clientSecret' => 'CLIENT_SECRET',  // Ditto above
    'country' => Country::US,           // Default Country::US if not set
]);

$api = Walmart::marketplace($config)->utilities();

$feedType = 'feedType_example'; // string | Specifies the Feed Type
$version = 'version_example'; // string | Specifies the version for the Feed Type

try {
    $result = $api->getTaxonomyResponse($feedType, $version);
    print_r($result);
} catch (Exception $e) {
    echo "Exception when calling UtilitiesApi->getTaxonomyResponse: {$e->getMessage()}\n";
}

Parameters

Name Type Description Notes
feedType string Specifies the Feed Type [optional]
version string Specifies the version for the Feed Type [optional]

Return type

\Walmart\Models\MP\US\Utilities\TaxonomyResponseDTO

Authorization

This endpoint requires the following authorization methods:

  • accessToken: Header authentication with a Walmart access token, which is automatically generated using your Client ID and Client Secret. The token is valid for 15 minutes, and will be passed in the WM_SEC.ACCESS_TOKEN header

See the Authorization section of the README for more information.

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