API reference
Shop Market Purchases_create
POST
shopApiKeyheader
AuthorizationBearer <token>The shop's API key.
application/json- body
itemId*stringThe market card, from the list of market cards
Match
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Format
uuidprice*The card price that the shop showed its buyer, from the list
buyerId*stringThe shop's own id of the buyer
Length
1 <= length <= 200requestId*stringThe shop's own id of the request. The same id again gives the same purchase and the same answer. A failed purchase stays failed: send a new request id to try again
Length
1 <= length <= 200application/json- response
data*curl -X POST 'https://api-stg.grailnetwork.com/shop/market-purchases' \ -H 'Content-Type: application/json' \ -d '{ "itemId": "f11b669d-7201-4c21-88af-d85092f0c005", "price": { "amountAtomic": "string", "currency": "USD" }, "buyerId": "string", "requestId": "string"}'Example Response
{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "itemId": "f11b669d-7201-4c21-88af-d85092f0c005", "cardName": "string", "buyerId": "string", "requestId": "string", "price": { "amountAtomic": "string", "currency": "string" }, "state": "started", "reason": "balance_too_low", "holdingId": "51ebd04a-ea04-425f-9017-f69b7702e7a3", "createdAt": "2019-08-24T14:15:22Z" }}