Skip to content

GetMarketplaceSale

Walter Lara edited this page Jan 17, 2025 · 9 revisions

Get Marketplace Sale

Allows to get a single Marketplace Sale.

Request

URL: /v1/marketplace/sales/{saleId}

Method: GET

Path Parameters:

Parameter Type Description
saleId string UUID of the Sale to retrieve.

Query Parameters: None

Headers:

Accept: application/json

g-recaptcha-platform: {Web|Android|iOS}

g-recaptcha-token: {reCAPTCHA Token for "get_sale" action}

✅ Success Response

Code: 200 OK

Headers:

Content-Type: application/json

Content:

Field Type Description Condition
id string UUID of the Sale. Always
createdAt string Date and time when the Song was created (ISO-8601 format). Always
status string Sale status. Valid valid values are: Started, SoldOut & Ended. Always
pointerPolicyId string Policy ID of the pointer token. Always
pointerAssetName string Asset Name (hex-encoded) of the pointer token. Always
bundlePolicyId string Policy ID of the bundle token. Always
bundleAssetName string Asset Name (hex-encoded) of the bundle token. Always
bundleAmount int64 Amount of tokens in one unit of sale. Always
costPolicyId string Policy ID of the cost token, or 555344 if USD. Always
costAssetName string Asset Name (hex-encoded) of the cost token, or empty if USD. Always
costAmount int64 Token amount (12 decimal-places if USD or 6 otherwise) in one unit of cost. Always
costAmountUsd string USD amount in one unit of cost. Always
costAmountNewm string NEWM Token amount in one unit of cost. Always
maxBundleSize int64 Maximum bundle size allowed. Always
totalBundleQuantity int64 Total quantity of bundles originally for sale. Always
availableBundleQuantity int64 Available quantity of bundles for sale. Always
song object Song object (see details bellow) Always

Song Object:

Field Type Description Condition
id string UUID of the Song. Always
artistId string UUID of the song artist. Always
artistName string Stage name of the song artist. Always
artistPictureUrl string Valid URL of the song artist picture file. Only if available
title string Song title. Always
description string Song description. Only if available
parentalAdvisory string Song parental advisory. Only if available
genres string array Song genres. Always
moods string array Song moods. Only if available
coverArtUrl string Valid URL of cover art picture file. Always
clipUrl string Valid URL of song audio clip file. Always
tokenAgreementUrl string Valid URL of song token agreetment document. Always
assetUrl string Valid URL of song asset at pool.pm or cardanoscan.io. Always
collaborators object array Song collaborator objects (see details bellow). Always
smartLinks object array Song smart-link objects (see details bellow). Always

SongCollaborator Object:

Field Type Description Condition
id string UUID of the song collaborator. Always
name string Stage name of the song collaborator. Always
pictureUrl string Valid URL of the song colaborator picture file. Only if available
role string Role of the song collaborator. Always

SongSmartLink Object:

Field Type Description Condition
id string UUID of the Smart Link. Always
storeName string The store name. Always
url string The smart link URL. Always

Content example:

{
    "id": "7bd2862f-8deb-4814-8943-156d9dab80dd",
    "createdAt": "2022-04-22T20:47:55.738918",
    "status": "Started",
    "pointerPolicyId": "f5cb10641e282c4a18084e51bd717475d6984978b0e32d624b4b1c32",
    "pointerAssetName": "ca11ab1e01053c4232c1189f00613aa65f3a5bf33fedb92f41ff445e241764e0",
    "bundlePolicyId": "3333c8022c24d2014f02236c082105ebceb73c46c45f94eb99136f92",
    "bundleAssetName": "001bc280022c6aa9b521e86f0df5f762c9b908de4d0606a7ce1f0220ae3b22d0",
    "bundleAmount": 1,
    "costPolicyId": "682fe60c9918842b3323c43b5144bc3d52a23bd2fb81345560d73f63",
    "costAssetName": "4e45574d",
    "costAmount": 10000000,
    "costAmountUsd": "0.1234456",
    "costAmountNewm": "10.123456",
    "maxBundleSize": 1000000,
    "totalBundleQuantity": 100000000,
    "availableBundleQuantity": 400000,
    "song": {
       "id": "85d286ee-8deb-4813-2943-446d9dab80dd",
       "artistId": "55286ee-77eb-6813-2943-546d966b8067",
       "artistName": "The Weeknd",
       "artistPictureUrl": "https://www.example.com/theweeknd.png",
       "title": "Blinding Lights",
       "description": "Song by The Weeknd",
       "genres": ["Synthwave", "Synthpop"],
       "moods": ["Cool", "Upbeat"],
       "coverArtUrl": "https://www.example.com/bindinglights/cover.png",
       "clipUrl": "https://www.example.com/bindinglights/clip.mp3",
       "tokenAgreementUrl": "https://www.example.com/bindinglights/agreement.pdf",
       "assetUrl": "https://www.example.com/asset85d286eede48132943446d9dab80dd",
       "collaborators": [
          {
             "id": "78d286ee-87eb-4613-2943-78889dab80dd",
             "name": "John Doe",
             "pictureUrl": "https://www.example.com/johndoe.png",
             "role": "Producer"
          },
          {
             "id": "57d286ee-97eb-3613-5943-44449dab80dd",
             "name": "Jane Doe",
             "pictureUrl": "https://www.example.com/janedoe.png",
             "role": "Lyrics"
          }
       ],
       "smartLinks": [
          {
             "id": "8038e46d-c3c2-4197-8f5a-7bf9c2db98f4",
             "storeName": "Spotify",
             "url": "https://open.spotify.com/album/0MeKAJYCC9DCZnt4Nz6HLV"
          },
          {
             "id": "80c7c027-d8d5-496f-bdae-b70444c3aa41",
             "storeName": "Apple Music",
             "url": "https://geo.music.apple.com/us/album/1773721964?app=music&ls=1"
          }
       ]
    }
}

❌ 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 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"
}

3. Unprocessable Entity

Code: 422 UNPROCESSABLE ENTITY

Condition: If {saleId} is malformed.

Headers:

Content-Type: application/json

Content example:

{
    "code": 422,
    "description": "Unprocessable Entity",
    "cause": "Invalid UUID string: 123456789"
}

See Also

Get Marketplace Sales

Get Marketplace Sale Count

Clone this wiki locally