Skip to Content
Grail Network
API reference

Shop Market Purchases_create

POST
/shop/market-purchases

Authorization

shopApiKey
headerAuthorizationBearer <token>

The shop's API key.

Request Body

application/json
  1. body
itemId*string

The 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)$
Formatuuid
price*

The card price that the shop showed its buyer, from the list

buyerId*string

The shop's own id of the buyer

Length1 <= length <= 200
requestId*string

The 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

Length1 <= length <= 200

Response Body

application/json
  1. response
data*
Example Request
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"  }}