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. A GET on products/user scoped to a game this way returns every product of that game, lowest product ID first.
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.
GET (admin, optional) count Products per page when the call names no sku, product_id or parent_id. Default: 50, maximum: 100.
GET (admin, optional) page 1-based page number for that same unscoped call. Default: 1.

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 product uat-test_unlockable"
      },
      "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"
      }
    }
  ]
}