-
Notifications
You must be signed in to change notification settings - Fork 4
GenerateMarketplaceOrderAmount
Allows to generate a Marketplace Order Amount.
URL: /v1/marketplace/orders/amount
Method: POST
Path Parameters: None
Query Parameters: None
Headers:
Content-Type: application/json
Accept: application/json
g-recaptcha-platform: {Web|Android|iOS}
g-recaptcha-token: {reCAPTCHA Token for "generate_order_amount" action}
Content:
Field | Type | Description | Condition |
---|---|---|---|
saleId | string | UUID of the Sale. | Always |
bundleQuantity | int64 | Quantity of bundles to purchase. | Always |
incentiveAmount | int64 | Incentive amount per action in the token units indicated in the listed Sale . This value is always doubled in the actual computation, since two incentivized actions are required in an order: purchase and removal. If missing, defaults to the minimum. |
Optional |
Content example:
{
"saleId": "842f5460-76f8-41d8-add9-d043a7a381de",
"bundleQuantity": 100
}
Code: 200 OK
Headers:
Content-Type: application/json
Content:
Field | Type | Description | Condition |
---|---|---|---|
orderId | string | UUID of the pending order associated with the generate amount. | Always |
amountCborHex | string | CBOR format-encoded generated amount. | Always |
Content example:
{
"orderId": "662f5460-86f8-21d8-3dd9-c043a7a3845e",
"amountCborHex": "7567ab8282582006443fd5b04bbce0ca9e64b4311376d85bad947303f193dbfa905024b91913b1008258208d0ecf25f177810407c5bb650bb60bb3a13cc590cd67c76ae45f9b1edf1729770001818258390189a5b59cc40dddad7b4630fc864e93842e44566cd0deee83fb150e36d75963997337046befa69a4777244b5be77bfb6cba370de0c4cef5cf1a000f4240021a000f4240031a04d9f523a10081825820d32d3e261186eec6c3e49f5d3db9fda6ce8c8f7caa6865f43ccd819ef174b8c35840604aa8c83096dee85094e23c374079e6d509426d2d9713459bf22638192fce62e4e6f231f2cdaabcf2b57674ed8b4260069c598665c93e0fa7a2efd3753787007dfe"
}
Code: 403 FORBIDDEN
Condition: If reCAPTCHA fails.
Headers:
Content-Type: application/json
Content example:
{
"code": 403,
"description": "Forbidden",
"cause": "Recaptcha failed"
}
Code: 404 NOT FOUND
Condition: If the specified Sale is not found.
Headers:
Content-Type: application/json
Content example:
{
"code": 404,
"description": "Not Found",
"cause": "Entity MarketplaceSaleEntity, id=d0907e3d-a9a7-43b1-93dc-f3b0ee929021 not found in the database"
}
Code: 422 UNPROCESSABLE ENTITY
Condition: If any of the request payload values is unacceptable.
Headers:
Content-Type: application/json
Content example:
{
"code": 422,
"description": "Unprocessable Entity",
"cause": "Bundle quantity (100) exceeds sale availability (50)"
}