API Documentation

Contents

Cardmarket RESTful API Documentation Main Page


Quick Links

API 2.0 MainHTTP Status CodesSandbox Server (currently not available)Authentication OverviewAuthorization header


Cardmarket API Versions

We have the following API versions running at the live servers:


News

Bugfixing

April 6th, 2018

Due to some backend changes, several entities contained some incorrect information, e.g. the Order entity of an order, that was merged into another order had a 0 value for the wasMergedInto instead of the ID of the new order the original order was merged into.

We provided some fixes to the live environment correcting all known bugs with entities.

Sandbox Server

February 28th, 2018

Unfortunately we had to push back the new sandbox server again. A new projected date, the sandbox server will be available again, is not yet available.

We apologize for any inconveniences this issue causes.

Provide Tracking Number to Orders

February 28th, 2018

We introduced a new 2.0 API request for seller to provide a tracking number to an order.

Stock File Requests (2.0) also to return sealed product

January 26th, 2018

The API-Request returning your stock as a file can now also return a file with all sealed product. Please refer to the respective documentation: Stock (File).

API available under Cardmarket.com

January 22nd, 2018

The API is now also available under the Cardmarket.com domain structure. Please make sure to change over your implementation from www.mkmapi.eu to the new api.cardmarket.com domain until August 1st, 2018. We will switch off the old domain on that day as well as the API version 1.0.

The sandbox server will return under cardmarket.com during February 2018.


Help

To effectively help with any problems regarding API requests, we need the following information - as complete as possible and independent from any used programming language, libraries, frameworks, etc.:

We also don't need any implementation steps like base string composition or signature calculation steps, "naked" request information is everything we need.

Example:

Request method + request URI

GET https://api.cardmarket.com/ws/v2.0/output.json/account

Complete request headers

Host:                           api.cardmarket.com
Accept:                         */*
Authorization:                  OAuth realm="https%3A%2F%2Fapi.cardmarket.com%2Fws%2Fv2.0%2Foutput.json%2Faccount",         
                                oauth_consumer_key="XXXXXXXXXXXXXXXX",
                                oauth_token="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                                oauth_nonce="5a72bc1e93401",
                                oauth_timestamp="1517468702",
                                oauth_signature_method="HMAC-SHA1",
                                oauth_version="1.0",
                                oauth_signature="XXXXXXXXXXXXXXXXXXXXXXXXXXX"

Request body

n/a

HTTP status code

200 OK

Complete response headers

Set-Cookie:                     PHPSESSID=c3rmrqe616mm2q6617srhi8i81; path=/; secure; HttpOnly 
Access-Control-Allow-Methods:   GET, OPTIONS
Content-Type:                   application/json; charset=utf-8
Access-Control-Allow-Origin:    *
Access-Control-Allow-Headers:   Content-Type, Authorization, X-Requested-With 
Access-Control-Expose-Headers:  Content-Range, Range Access-Control-Max-Age1000 
X-Request-Limit-Count:          1 
X-Request-Limit-Max:            50000 
Date:                           Thu, 01 Feb 2018 07:05:05 GMT 
Expires:                        Thu, 01 Feb 2018 07:05:05 GMT 
Content-Length:                 1168

Response body, if applicable

{
    "account": {
        "idUser": 123456789,
        "username": "CranePooleSchmidt",
        "country": "D",
        "isCommercial": 1,
        "maySell": true,
        "sellerActivation": 3,
        "riskGroup": 0,
        "lossPercentage": "0 - 2%",
        "reputation": 1,
        "shipsFast": -1,
        "sellCount": 36,
        "soldItems": 96,
        "avgShippingTime": 1,
        "onVacation": false,
        "idDisplayLanguage": 1,
        "name": {
            "firstName": "Denny",
            "lastName": "Crane"
        },
        "homeAddress": {
            "name": "Denny Crane",
            "extra": null,
            "street": "500 Boylston Street",
            "zip": "02116",
            "city": "Boston",
            "country": "D"
        },
        "email": "denny.crane@cranepooleschmidt.com",
        "phoneNumber": "00491234567890",
        "vat": null,
        "legalInformation": "",
        "registerDate": "2011-10-26T09: 20: 12+0200",
        "isActivated": true,
        "moneyDetails": {
            "totalBalance": 24.48,
            "moneyBalance": 24.44,
            "bonusBalance": 0.04,
            "unpaidAmount": 0,
            "providerRechargeAmount": 0
        },
        "bankAccount": {
            "accountOwner": "Denny Crane",
            "iban": "DENNYCRANE",
            "bic": "DCBANK",
            "bankName": "Denny Crane Bank"
        },
        "articlesInShoppingCart": 0,
        "unreadMessages": 0
    },
    "links": [
    {
        "rel": "self",
        "href": "\/account",
        "method": "GET"
    },
    {
        "rel": "vacation",
        "href": "\/account\/vacation",
        "method": "PUT"
    },
    {
        "rel": "language",
        "href": "\/account\/language",
        "method": "PUT"
    },
    {
        "rel": "list_message_threads",
        "href": "\/account\/messages",
        "method": "GET"
    },
    {
        "rel": "redeem_coupon",
        "href": "\/account\/coupon",
        "method": "POST"
    }
    ]
}