Skip to content

GenerateMarketplaceSaleStartTransaction

Walter Lara edited this page Nov 10, 2024 · 3 revisions

Generate Marketplace Sale-Start Transaction

Allows to generate a Marketplace Sale-Start Transaction.

Request

URL: /v1/marketplace/sales/start/transaction

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_sale_start_transaction" action}

Content:

Field Type Description Condition
saleId string UUID of the pending sale. Always
changeAddress string Cardano wallet change address. Always
email string Email address to receive notifications. Optional
utxoCborHexList string CBOR format-encoded list of UTXOs. Always

Content example:

{
  "saleId": "842f5460-76f8-41d8-add9-d043a7a381de",
  "changeAddress": "addr1qxkxnvq4p2z0ls8gkhjw8kx4ht9tf0q65slwcnagd3qh8c6admwn2psp9mhqfe8yx3facmr6wmu3j7wg2uxv54nejddqcpsyfc",
  "email": "john.doe@gmail.com",
  "utxoCborHexList": "84a4008282582006443fd5b04bbce0ca9e64b4311376d85bad947303f193dbfa905024b91913b1008258208d0ecf25f177810407c5bb650bb60bb3a13cc590cd67c76ae45f9b1edf1729770001818258390189a5b59cc40dddad7b4630fc864e93842e44566cd0deee83fb150e36d75963997337046befa69a4777244b5be77bfb6cba370de0c4cef5cf1a000f4240021a000f4240031a04d9f523a10081825820d32d3e261186eec6c3e49f5d3db9fda6ce8c8f7caa6865f43ccd819ef174b8c35840604aa8c83096dee85094e23c374079e6d509426d2d9713459bf22638192fce62e4e6f231f2cdaabcf2b57674ed8b4260069c598665c93e0fa7a2efd375378700f5f6"
}

✅ Success Response

Code: 200 OK

Headers:

Content-Type: application/json

Content:

Field Type Description Condition
txCborHex string CBOR format-encoded generated transaction. Always

Content example:

{
  "txCborHex": "7567ab8282582006443fd5b04bbce0ca9e64b4311376d85bad947303f193dbfa905024b91913b1008258208d0ecf25f177810407c5bb650bb60bb3a13cc590cd67c76ae45f9b1edf1729770001818258390189a5b59cc40dddad7b4630fc864e93842e44566cd0deee83fb150e36d75963997337046befa69a4777244b5be77bfb6cba370de0c4cef5cf1a000f4240021a000f4240031a04d9f523a10081825820d32d3e261186eec6c3e49f5d3db9fda6ce8c8f7caa6865f43ccd819ef174b8c35840604aa8c83096dee85094e23c374079e6d509426d2d9713459bf22638192fce62e4e6f231f2cdaabcf2b57674ed8b4260069c598665c93e0fa7a2efd3753787007dfe"
}

❌ Error Responses

1. Forbidden

Code: 403 FORBIDDEN

Condition: If reCAPTCHA fails.

Headers:

Content-Type: application/json

Content example:

{
    "code": 403,
    "description": "Forbidden",
    "cause": "Recaptcha failed"
}

2. Not Found

Code: 404 NOT FOUND

Condition: If the specified pending Sale is not found.

Headers:

Content-Type: application/json

Content example:

{
    "code": 404,
    "description": "Not Found",
    "cause": "Entity MarketplacePendingSaleEntity, id=d0907e3d-a9a7-43b1-93dc-f3b0ee929021 not found in the database"
}

3. Unprocessable Entity

Code: 422 UNPROCESSABLE ENTITY

Condition: If unable to generate the transaction with the supplied payload.

Headers:

Content-Type: application/json

Content example:

{
    "code": 422,
    "description": "Unprocessable Entity",
    "cause": "Failed to build sale-start transaction: malformed address"
}

See Also

Generate Marketplace Sale-Start Amount

Clone this wiki locally