API Documentation >> API 2.0 Main >> Stock Management >> Stock
The requests returns the stock. You must specify parameters for start.
Attention: This request can't be used to increase or decrease the stock's quantity for specified articles!
Attention: You can pass up to 100 articles to be add (POST), changed (PUT), or deleted (DELETE) at the same time. Passing more will result in a 400 Bad Request
response.
https://api.cardmarket.com/ws/v2.0/stock
start
<?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) <count /> // Quantity (for POST), quantity of updated, resp. deleted articles (for PUT and DELETE) <idLanguage /> // Language of the article <comments /> // User comments <price /> // Price the article is offered for <condition /> // Condition, if applicable (optional) <isFoil /> <isSigned /> <isAltered /> <isFirstEd /> </article> </request>
Attention: While the count
value for POST
requests specify the amount of articles inserted into your stock, they specify the number of updated articles for PUT
, resp. the number of deleted articles for DELETE
requests. If you want to change the quantity of articles in your stock, please use the Change Stock Article Quantity requests.
It's possible to add, change, or delete more than one article at a time.
Possible idLanguage
values:
1
- English 2
- French 3
- German 4
- Spanish 5
- Italian 6
- Simplified Chinese 7
- Japanese 8
- Portuguese 9
- Russian10
- Korean11
- Traditional ChinesePossible condition
values:
MT
- MintNM
- Near Mint (default value when not passed)EX
- ExcellentGD
- GoodLP
- Light-playedPL
- PlayedPO
- PoorAll is...
flags are optional. The default value when not passed is false
. Possible values are true
and false
. Values other than false
are treated as true
.
An overview of the categories and their respective category specific attributes can be found on Category Specific Attributes
1. Retrieves articles 101 to 200 in the user's stock:
GET https://api.cardmarket.com/ws/v2.0/stock/101
2. Add an article to the user's stock:
POST https://api.cardmarket.com/ws/v2.0/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> </article> </request>
3. Change articles in user's stock
PUT https://api.cardmarket.com/ws/v2.0/stock
<?xml version="1.0" encoding="UTF-8" ?> <request> <article> <idArticle>14449120</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> </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> </article> </request>
4. Delete articles from user's stock
DELETE https://api.cardmarket.com/ws/v2.0/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>