Products / Premium Content / Purchases

This service is for giving, taking away, or listing products that a user has purchased (or has been given) for a particular game or for the website.

For a PUT request, a signature is required as part of the request.

URI

GET/POST/PUT https://services.armorgames.com/services/rest/v1/products/user/{{ uid }}.json

Parameters

Method Name Description
ALL api_key Your API Key.
ALL sku The product SKU Identifier.
ALL parent_id The ID of the game or website service.
ALL (optional) type Either Game or Website. Default: Game.
PUT/POST qty Amount of incrementing or decrementing that you are attempting.
PUT increment Set to true if incrementing.
PUT decrement Set to true if decrementing.

Response

GET https://services.armorgames.com/services/rest/v1/products/user/b2463b9f5e2335a11acb37d41efcdf7f.json?parent_id =1000042&api_key=...
{
  "version": 1,
  "code": 200,
  "message": "OK",
  "payload": [
    {
      "purchase": {
        "success": false,
        "data": false,
        "message": "Getting from product.user\\/uat-test_unlockable\\/b2463b9f5e2335a11acb37d41efcdf7f\\/product"
      },
      "product": {
        "id": 114,
        "sku": "uat-test_unlockable",
        "name": "test_unlockable",
        "description": "Unlockable test product",
        "type": "unlockable",
        "price": "1.00",
        "display_order": 0,
        "data": [],
        "media": {
          "image": "product-images\\/pr3csxmxR7u5ky52RXUz_star.png?v=1434404834"
        },
        "status": "active",
        "parent_type": "game",
        "sold": 0,
        "created_on": "2015-06-15 17:47:14",
        "updated_on": "2015-06-15 17:37:14"
      }
    }
  ]
}