Purchase history

Url: https://api.playkey.net/rest/PlaykeyAPI.svc/user/sales

HTTP Method: POST

The following is an description request Json body:

lang - Display language
api_version - API version (default equal 1)
ga_clientId - Google Analytics ID
token - Authentication token

The following is an example request Json body:

{
    "lang": "lang",
    "api_version": 417697797,
    "ga_clientId": "gaclientid",
    "token": "token"
}

Description of how to response:

error - Error information
    code - Error code. Error 0 - no error
    message - Error message. Empty if none
purchase - Information on all user purchases
     - Sales information
    [
        date - Time of purchase
        name - Product title
        code - Product code in the Playkey manual
        cost - Selling price
        number - Order number
        partner - Partner name
        currency - Currency code
        formatted_price - Formatted price string with currency
        type - Type
        ext_id - External sale id
        ext_order_hyperlink - Hyperlink to external service with sale transaction info
    ]

The following is an example response Json body:

{
    "error": {
        "code": 0,
        "message": "string"
    },
    "purchase": [
        {
            "date": "01-01-0001 00:00:00",
            "name": "string",
            "code": "string",
            "cost": 1188225725,
            "number": 550575073,
            "partner": "string",
            "currency": "string",
            "formatted_price": "string",
            "type": "string",
            "ext_id": "string",
            "ext_order_hyperlink": "string"
        },
        {
            "date": "01-01-0001 00:00:00",
            "name": "string",
            "code": "string",
            "cost": 1188225725,
            "number": 550575073,
            "partner": "string",
            "currency": "string",
            "formatted_price": "string",
            "type": "string",
            "ext_id": "string",
            "ext_order_hyperlink": "string"
        }
    ]
}

The following is an example response Xml body:

<result xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <error>
    <code>0</code>
    <message>string</message>
  </error>
  <purchase>
    <PurchaseResult>
      <date>01-01-0001 00:00:00</date>
      <name>string</name>
      <code>string</code>
      <cost>1958753653</cost>
      <number>2042427413</number>
      <partner>string</partner>
      <currency>string</currency>
      <formatted_price>string</formatted_price>
      <type>string</type>
      <ext_id>string</ext_id>
      <ext_order_hyperlink>string</ext_order_hyperlink>
    </PurchaseResult>
    <PurchaseResult>
      <date>01-01-0001 00:00:00</date>
      <name>string</name>
      <code>string</code>
      <cost>1958753653</cost>
      <number>2042427413</number>
      <partner>string</partner>
      <currency>string</currency>
      <formatted_price>string</formatted_price>
      <type>string</type>
      <ext_id>string</ext_id>
      <ext_order_hyperlink>string</ext_order_hyperlink>
    </PurchaseResult>
  </purchase>
</result>