Coder Social home page Coder Social logo

partnerapi_sdk_dotnet's Introduction


NOTICE:

This repository has been archived and is not supported.

No Maintenance Intended


Walmart Partner API SDK for .NET


The Walmart Partner API SDK for .NET allows you to build applications that easily integrates with the Walmart Marketplace API

This is a .NET SDK (written in C#) containing convenience libraries and examples of their usage for e-commerce merchants to conduct business on Walmart's marketplace platform.

Walmart's marketplace provides several secure HTTP REST end-points for merchants to submit their items for listing on Walmart's marketplace - Walmart.com. There are also secure HTTP REST end-points for updating prices and inventories, and retrieve order and update their status.

This .NET package demonstrates how to invoke the HTTP REST end-points using C#. It does not include examples in other programming languages such as Java, Perl, Python and PHP which also can be used to invoke the same HTTP REST end-points. The package consists of a zip file containing a .Net Standard 1.3 Library and .Net Core 2.0 (or .NET Framework v4.6) project.

In order to invoke secure HTTP REST end-points, your company must be a registered seller on Walmart.com marketplace. Registration will provide you with a consumer ID and a private key to make secure calls.

Or you can use the "mock" end-points to get an idea of how the real end-points work. This can help you to start and test your integration even before you complete your registration.

Target Frameworks

  • .NET Framework 4.6
  • .NET Standard 1.3

Sample Application

You can find documentation here.

Docker Image for Sample Application

This repository provides a Dockerfile to build an image for sample application. Before you start, make sure Docker is installed and running (instructions).

This project supply Dockerfile to build a Docker image with Sample application. To build it on your local machine run

docker build -t <image-name> .

The following command starts a container

docker run -it -v <folder-with-creds>:/app/settings <image-name>

Example:

Check out the source code of this repo in any folder, for example /Users/test/WalmartMarketplaceClient, then execute

cd /Users/test/WalmartMarketplaceClient/
docker build -t partnerapi-app .

You need to place your API creds as "credentials.json" file in the folder /Users/test/WalmartMarketplaceClient/settings. You can read more about this file here

Execute the following command to start Sample application

docker run -v $(pwd)/settings:/app/settings -it partnerapi-app 

Code Snippets

You can find list of examples here

Usage

Installation

This package is distributed as a source code, you need to manually build it and link library from your project. NuGet repository will be available soon, stay tuned!

Build

To build dotnet build Source/

To run tests:

Unit & Integration tests - scripts/run_mp_fast_tests.cmd

E2E tests - scripts/run_mp_e2e_tests.cmd

API Coverage

Object Operation V2/V3 SDK Class -> Method Tests V2/V3
Feeds Get all feed statuses Yes/Yes FeedEndpoint.GetAllFeedStatuses No / No
Get a feedItems status Yes/Yes FeedEndpoint.GetFeedStatus Yes/Yes
Get a feed status Yes/Yes FeedEndpoint.GetFeedStatus Yes/Yes
Items Get all items Yes/Yes ItemEndpoint.GetAllItems Yes/Yes
Get an item Yes/Yes ItemEndpoint.GetItem Yes/Yes
Retire an item Yes/Yes ItemEndpoint.RetireItem Yes/Yes
Bulk create/update items Yes/Yes ItemEndpoint.BulkItemsUpdate Yes/Yes
Prices Update a price Yes/Yes PriceEndpoint.UpdatePrice Yes/Yes
Update bulk prices Yes/Yes PriceEndpoint.UpdateBulkPrices Yes/Yes
Set up CPA SKU Opt-in/Opt-out NA/Yes PriceEndpoint.OptInOutBulkCpaSku NA/No
Set up CPA SKU All NA/Yes PriceEndpoint.SetupAllCpaSku NA/No
Promotions Update Bulk Promotional Prices Yes/Yes PromotionEndpoint.UpdatePromotionPricesInBulk Yes/Yes
Promotional Prices NA/Yes PromotionEndpoint.GetPromotionPrice NA/Yes
Update a Promotional Price NA/Yes Promotion.Endpoint.UpdatePromotionPrice NA/Yes
Orders Get all released orders Yes/Yes OrderEndpoint.GetAllReleasedOrders No / No
Get all orders Yes/Yes OrderEndpoint.GetAllOrders No/No
Get an order Yes/Yes OrderEndpoint.GetOrderById No/No
Acknowledge purchase order Yes/Yes OrderEndpoint.AckOrder No/No
Cancel order lines Yes/Yes OrderEndpoint.CancelOrderLines No/No
Refund order lines Yes/Yes OrderEndpoint.RefundOrderLines No/No
Shipping notification/updates Yes/Yes OrderEndpoint.ShippingUpdates No/No
Inventory Get inventory for an item Yes/NA Inventory.GetInventory Yes/NA
Update inventory for an item Yes/NA Inventory.UpdateInventory Yes/NA
Bulk update inventory Yes/Yes Inventory.UpdateBulkInventory Yes/Yes

Disclaimer

This software is distributed free of cost.

  • Walmart assumes no responsibility for its support
  • Copyright (c) 2018 Walmart Corporation

partnerapi_sdk_dotnet's People

Contributors

cwstege avatar roman-shuhov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

partnerapi_sdk_dotnet's Issues

BouncyCastle.Crypto

Hi,

I use .NET 4.61 and MVC 5. I receive this error:

{"Could not load file or assembly 'BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=null"}

I have referenced the .NET version of 1.8.1.0. Am I missing a file?

Charges and OrderStatuses

Hi,

In your code, the software fails to see the charges or the order statuses list in the order object. In the attached screenshot, the charge should have a value.

data2

data3

data.txt

Issue with using Test Application

Hello, I am trying to use the sample application as is to see if the API is working or not. I am getting 401 Unauthorized error. I can confirm that Consumer ID and API keys are correct. I am trying to figure out why this wouldn't be working and why I would be getting 401 Unauthorized error.

Any help will be really appreciated.

Thank you!

Use of new access token based authentication in this SDK

I recently noticed on the API Keys page in developer portal that Walmart is going to deprecate the "signature method" and recommends developers to start using the "new token based authentication".

Is there a roadmap for this dotnet sdk to use the new token based authentication anytime soon?

image

Can't create or Update an item

I tried to use Sample app. I tried to check creating and updating items using standard template itemFeed.xml. The following error appears: The data isn't formatted properly. Please resubmit the data file in the correct format. Please advise

Can't Provide shipping Updates for orders

Hi, I am using your sample application to send shipping updates to Walmart, the code does not work. here is the error:

{
"errors": {
"error": [
{
"code": "INVALID_REQUEST_CONTENT.GMP_ORDER_API",
"description": "com.sun.istack.SAXParseException2; lineNumber: 2; columnNumber: 1; unexpected element (uri:"", local:"orderShipment"). Expected elements are <{}Cause>,<{}Error>,<{}GatewayError>,<{}Orders>,<{}ServiceHeader>,<{}ServiceResponse>,<{}entity>,<{http://walmart.com/}error>,<{http://walmart.com/}errors>,<{}list>,<{http://walmart.com/mp/orders}list>,<{http://walmart.com/mp/v3/orders}list>,<{}order>,<{http://walmart.com/mp/orders}order>,<{http://walmart.com/mp/v3/orders}order>,<{http://walmart.com/mp/orders}orderCancellation>,<{http://walmart.com/mp/v3/orders}orderCancellation>,<{http://walmart.com/mp/orders}orderRefund>,<{http://walmart.com/mp/v3/orders}orderRefund>,<{http://walmart.com/mp/orders}orderShipment>,<{http://walmart.com/mp/v3/orders}orderShipment>,<{}ordersList>",
"info": "Request content is invalid.",
"severity": "ERROR",
"category": "DATA",
"causes": [],
"errorIdentifiers": {
"entry": []
}
}
]
}
}

Walmart Consumer Key and Secret

Hi,

Walmart is introducing a new way to pair their app that involves no API signature. Can you add the code to use the new consumer key and secret?

walmart

AckOrder giving 500 error

This SDK works great for our needs, and we have been using it to get the orders.
But, when we try to acknowledge an order, we get an exception:
In the code screenshot below, The line 1 works fine, and gets all the orders, but line 2 below gives an error:
API Error Occured [500 Internal Server Error]
[ERROR] - SYSTEM_ERROR.GMP_GATEWAY_API;

image

Could you please let us know if we are doing something wrong?

No Orders with JSON

If I change the API format to JSON, the code finds no orders. Here is a valid response.

ods.txt

        config = new ClientConfig(clientId, clientSecret);
        config.ChannelType = channelType;
        config.ApiFormat = Sdk.Base.Primitive.ApiFormat.JSON;

The ordersList returns no orders in the elements object:

    public OrdersListType SearchOrders(DateTime beginTime, DateTime endTime, OrderLineStatusValueType ty)
    {
        var apiClient = new ApiClient(config);
        var ordersEndpoint = new OrderEndpoint(apiClient);

        OrderFilter filter = new OrderFilter();

        if (ty == OrderLineStatusValueType.Shipped)
        {
            filter.Status = OrderLineStatusValueType.Shipped;
        }

        filter.CreatedEndDate = endTime;
        filter.CreatedStartDate = beginTime;

        filter.Limit = 20;

        OrdersListType orderList = new OrdersListType();

        try
        {
            orderList = ordersEndpoint.GetAllOrders(filter).Result;
        }
        catch (Exception ex)
        {

        }

        return orderList;
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.