Contents

/stock[/:start]

Allowed HTTP Methods

Basically the requests returns the complete stock. By specifying the start parameter, the response can be limited to 100 entities.

Attention: This request can't be used to increase or decrease the stock's quantity for specified articles!

Resource Information

Parameters

Request Object

<?xml version="1.0" encoding="UTF-8" ?>
<request>
    <article>
        <idProduct />           // Product ID the article is derived from (for POST) OR
        <idArticle />           // Article ID (for PUT and DELETE)
        <idLanguage />          // Language of the article
        <comments />            // User comments
        <count />               // Quantity
        <price />               // Price the article is offered for
        <condition />           // Condition, if applicable (optional)
        <isFoil />
        <isSigned />
        <isAltered />
        <isPlayset />
        <isFirstEd />
    </article>
</request>

It's possible to add, change, or delete more than one article at a time.

Possible idLanguage values:

Possible condition values:

All is... flags are optional. The default value when not passed is false. Possible values are true and false.

Attention: ATM, other values than false are treated as true. Therefore we suggest to either omit that optional value, or use false as the default value if not explicitly set to true.

They are applicable for the following currently supported games:

Magic Yu-Gi-Oh! WoW The Spoils
isFoil X X X
isSigned X X X
isAltered X
isPlayset X X X
isFirstEd X

Example Request

1. Retrieves all articles in the authenticated user's stock:

GET https://api.cardmarket.com/ws/v1.1/stock


2. Retrieves articles 101 to 200 in the user's stock:

GET https://api.cardmarket.com/ws/v1.1/stock/101


3. Add an article to the user's stock:

POST https://api.cardmarket.com/ws/v1.1/stock

<?xml version="1.0" encoding="UTF-8" ?>
<request>
    <article>
        <idProduct>100569</idProduct>
        <idLanguage>1</idLanguage>
        <comments>Inserted through the API</comments>
        <count>1</count>
        <price>4</price>
        <condition>EX</condition>
        <isFoil>true</isFoil>
        <isSigned>false</isSigned>
        <isPlayset>false</isPlayset>
    </article>
</request>

4. Change articles in user's stock

PUT https://api.cardmarket.com/ws/v1.1/stock

<?xml version="1.0" encoding="UTF-8" ?>
<request>
    <article>
        <idArticle>144491121</idArticle>
        <idLanguage>1</idLanguage>
        <comments>Edited through the API</comments>
        <count>4</count>
        <price>4</price>
        <condition>EX</condition>
        <isFoil>true</isFoil>
        <isSigned>false</isSigned>
        <isPlayset>false</isPlayset>
    </article>
    <article>
        <idArticle>42914990</idArticle>
        <idLanguage>1</idLanguage>
        <comments>Edited through the API</comments>
        <count>3</count>
        <price>4</price>
        <condition>EX</condition>
        <isFoil>true</isFoil>
        <isSigned>false</isSigned>
        <isPlayset>false</isPlayset>
    </article>
</request>

5. Delete articles from user's stock

DELETE https://api.cardmarket.com/ws/v1.1/stock

<?xml version="1.0" encoding="UTF-8" ?>
<request>
    <article>
        <idArticle>144491157</idArticle>
        <count>1</count>
    </article>
    <article>
        <idArticle>144491160</idArticle>
        <count>1</count>
    </article>
</request>