API:Sale

From MCM Combat Operations
Revision as of 01:15, 25 January 2015 by Nash Fraenkel (development | contribs) (Created page with "Record of a product purchase with lindens or MCM credits. URI : /sales/{saleID} '''NOTE:''' While presence of a sale for a particular user-product combination is proof that ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Record of a product purchase with lindens or MCM credits.

URI : /sales/{saleID}

NOTE: While presence of a sale for a particular user-product combination is proof that that user owns that product, absence of such a sale does NOT mean that the user does not own that product. There are several ways that a user might acquire a product without a sale being recorded, including a sales update (i.e. the product was manually added to the user's account), the purchase predates the current system, they were given the product by an admin without a sales update being done (as for play-testing purposes), or a marketplace sale was made but not yet processed. Demonstrating that the product is in a user's inventory is definitive proof of ownership regardless of a lack of other records.

See also: api:SalesUpdate

Example Request

GET /sales/30210
Accept: application/hal+json

 -- response --
200 OK
Content-Type:  application/hal+json

{
    "_links": {
        "self": {
            "href": "\/sales\/30210"
        },
        "curies": [
            {
                "name": "mcm",
                "href": "http:\/\/wiki.mcm-systems.net\/index.php?title=api:{rel}",
                "templated": true
            }
        ],
        "mcm:delivery": {
            "href": "\/sales\/30210\/delivery"
        },
        "mcm:product": {
            "href": "\/products\/20"
        }
    },
    "saleID": "30210",
    "user": "Bellimora Resident",
    "productID": "20",
    "price": "382",
    "date": "2015-01-24",
    "type": "Linden"
}