API Documentation >> API 2.0 Main >> Stock Management >> Change Stock Article Quantity

Contents

Change Stock Article Quantity

Allowed HTTP Methods

Attention: Increasing the stock for an article may fail, because we have limitations on how many copies of an article different seller types (private, professional) can have in their stock. In this case, the response body will have the failed key collecting all articles that failed in increasing the copies - in addition to the article key collecting all successful increases.

Attention: You can pass up to 100 articles to changed (PUT) at the same time. Passing more will result in a 400 Bad Request response.

Resource Information

Request Object

<?xml version="1.0" encoding="UTF-8" ?>
<request>
    <article>
        <idArticle />           // Article ID
        <count />               // Quantity
    </article>
</request>

The quantity of more than 1 article can be changed at once.

Example Request

1. Increase the quantity of an article in user's stock:

PUT https://api.cardmarket.com/ws/v2.0/stock/increase

<?xml version="1.0" encoding="UTF-8" ?>
<request>
    <article>
    	<idArticle>144491158</idArticle>
        <amount>1</amount>
    </article>
</request>

2. Decrease the quantity of articles in user's stock:

PUT https://api.cardmarket.com/ws/v2.0/stock/decrease

<?xml version="1.0" encoding="UTF-8" ?>
<request>
    <article>
    	<idArticle>144491158</idArticle>
        <amount>4</amount>
    </article>
    <article>
    	<idArticle>144491160</idArticle>
        <amount>1</amount>
    </article>
</request>