Buy an offer
How to buy a certain offer for yourself or on behalf of your sub-user..
The Market API will be discontinued, in Q3 2024 we will be sunsetting this product
Request Endpoint: reference
POST /fulfillments
Parameter | Param Type | Description | Data Type | Mandatory |
---|---|---|---|---|
type | Body | The type of fulfillment: PURCHASE or REIMBURSEMENT | String | ✅ |
offerId | Body | The offer ID that is to be bought | String | ✅ |
amount | Body | The number of items to buy | Integer | ❌ |
walletAddress | Body | The wallet address of the buyer (where they want to receive the item) | String | ❌ |
userId | Body | The sub-user ID for whom the fulfillment is being created (buyerId in case of purchase and sellerId in case of reimbursement) | String | ❌ |
Example Request (when buying for yourself):
POST https://api.venly.market/fulfillments
{
"type": "PURCHASE",
"offerId": "83f9abd1-e82e-4ee1-93b2-d0370f833e6f",
"amount": "1",
"walletAddress": "0xc0ffee254729296a45a3885639AC7E10F9d54979"
}
Example Request (when buying on behalf of your sub-user):
You can specify a sub-user id
, when you want to register a sale for a sub-user (see creating a sub-user). The NFT will be sent to the specified wallet address.
POST https://api.venly.market/fulfillments
{
"type": "PURCHASE",
"offerId": "83f9abd1-e82e-4ee1-93b2-d0370f833e6f",
"amount": "1",
"walletAddress": "0xc0ffee254729296a45a3885639AC7E10F9d54979",
"userId": "d6805fe3-ec41-4241-a510-5cb418f7bc3c"
}
Response Body:
{
"success": true,
"result": {
"id": "dcba3a7c-0e41-46a9-bd97-7eb59746f94e",
"type": "PURCHASE",
"offerId": "83f9abd1-e82e-4ee1-93b2-d0370f833e6f",
"amount": 1,
"status": "QUEUED",
"creationDate": "2022-04-20T13:26:58.809242",
"pricePerItem": 50,
"buyer": {
"id": "e38336b6-3307-4737-bf82-3a3a39269147",
"nickname": "Pieter",
"email": "[email protected]"
}
}
}
Updated 6 months ago