Skip to content

Latest commit

 

History

History
362 lines (240 loc) · 11.5 KB

ReportsApi.md

File metadata and controls

362 lines (240 loc) · 11.5 KB

Walmart\Apis\MP\US\ReportsApi

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

Method HTTP request Description
getAvailableReconReportDates() GET /v3/report/reconreport/availableReconFiles Available recon report dates(Legacy)
getAvailableV1ReconReportDates() GET /v3/report/reconreport/availableReconFiles?reportVersion=v1 Available recon report dates
getPartnerPerformance() GET /v3/report/payment/performance Performance Report
getPartnerStatement() GET /v3/report/payment/statement Payment Statement Report
getReconReport() GET /v3/report/reconreport/reconFile Recon report(Legacy)
getReconReportV1() GET /v3/report/reconreport/reconFile?reportVersion=v1 Recon report

getAvailableReconReportDates()

getAvailableReconReportDates(): \Walmart\Models\MP\US\Reports\ReconReportDateResponse

Available recon report dates(Legacy)

This API will list all the available Marketplace reconciliation report dates for the Seller.

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)->reports();


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

Parameters

This endpoint does not need any parameter.

Return type

\Walmart\Models\MP\US\Reports\ReconReportDateResponse

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]

getAvailableV1ReconReportDates()

getAvailableV1ReconReportDates(): \Walmart\Models\MP\US\Reports\ReconReportDateResponse

Available recon report dates

This API will list all the available Marketplace reconciliation report dates for the Seller.

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)->reports();


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

Parameters

This endpoint does not need any parameter.

Return type

\Walmart\Models\MP\US\Reports\ReconReportDateResponse

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]

getPartnerPerformance()

getPartnerPerformance(): \Walmart\Models\MP\US\Reports\PartnerProgramPerformanceRes

Performance Report

This API will get a partner's current cycle performance

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)->reports();


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

Parameters

This endpoint does not need any parameter.

Return type

\Walmart\Models\MP\US\Reports\PartnerProgramPerformanceRes

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]

getPartnerStatement()

getPartnerStatement(): \Walmart\Models\MP\US\Reports\PartnerProgramStatementRes

Payment Statement Report

This API will get a partner's current cycle statement

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)->reports();


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

Parameters

This endpoint does not need any parameter.

Return type

\Walmart\Models\MP\US\Reports\PartnerProgramStatementRes

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]

getReconReport()

getReconReport($reportDate): string

Recon report(Legacy)

Seller can download the reconciliation report for a specific date using this API. Dates available to be downloaded can be found by using the Get available reconciliation report dates API.

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)->reports();

$reportDate = 'reportDate_example'; // string | The date for which the reconcilation file is available

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

Parameters

Name Type Description Notes
reportDate string The date for which the reconcilation file is available

Return type

string

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]

getReconReportV1()

getReconReportV1($reportDate, $reportVersion): string

Recon report

Seller can download the reconciliation report for a specific date using this API. Dates available to be downloaded can be found by using the Get available reconciliation report dates API.

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)->reports();

$reportDate = 'reportDate_example'; // string | The date for which the reconcilation file is available
$reportVersion = 'reportVersion_example'; // string | Report Version

try {
    $result = $api->getReconReportV1($reportDate, $reportVersion);
    print_r($result);
} catch (Exception $e) {
    echo "Exception when calling ReportsApi->getReconReportV1: {$e->getMessage()}\n";
}

Parameters

Name Type Description Notes
reportDate string The date for which the reconcilation file is available
reportVersion string Report Version

Return type

string

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]