Create an asset / How to create a NFT listing for minting?

POST https://bakrypt.io/v1/assets/ || https://testnet.bakrypt.io/v1/assets/;

The following endpoint returns an Asset. Each attribute is limited to 64 characters per line.

e.g.,

Request

application/json

/* Vanilla Javascript example using fetch */
let accessToken = "<access_token>";
(async () => {
  let auth_url =
    `https://bakrypt.io/v1/assets/` || `https://testnet.bakrypt.io/v1/assets/`;
  const createAssetRequest = await fetch(auth_url, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${accessToken}`,
    },
    body: JSON.stringify({
        blockchain: "ada",
        amount: 1,
        name: "Test Name",
        asset_name: "Only4cceptsLetters4ndNumb3rs",
        image: "ipfs://QmbZxCkD1bniE21CPudEwRP6HVJfiSopL6DJPK8QrWiSjn",
        is_auto: true 
      })
  });
	
  const assetResponse = await createAssetRequest.json()
  
  console.log(assetResponse);
})();
/* Vanilla Javascript example using fetch */
let accessToken = "<access_token>";
(async () => {
  let auth_url =
    `https://bakrypt.io/v1/assets/` || `https://testnet.bakrypt.io/v1/assets/`;
  const createAssetRequest = await fetch(auth_url, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${accessToken}`,
    },
    body: JSON.stringify({
        blockchain: "ada",
        amount: 1,
        name: "Test Name",
        asset_name: "Only4cceptsLetters4ndNumb3rs",
        image: "ipfs://QmbZxCkD1bniE21CPudEwRP6HVJfiSopL6DJPK8QrWiSjn",
        is_auto: true,      
        royalties_rate: 9,
        royalties:
        "addr_test1qzr84dy9syhkdy3ffn8c3mn8n2zh0wzhgwltz2dle5phaaky56y0ulyxyrz2mra05y8xsnxcgphrleag8m5xs0llszrkjah",
      })
  });
	
  const assetResponse = await createAssetRequest.json()
  
  console.log(assetResponse);
})();
/* Vanilla Javascript example using fetch */
let accessToken = "<access_token>";
(async () => {
  let auth_url =
    `https://bakrypt.io/v1/assets/` || `https://testnet.bakrypt.io/v1/assets/`;
  const createAssetRequest = await fetch(auth_url, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${accessToken}`,
    },
    body: JSON.stringify({
      blockchain: "ada",
      amount: 1,
      name: "Test Name",
      asset_name: "Only4cceptsLetters4ndNumb3rs",
      image: "ipfs://QmbZxCkD1bniE21CPudEwRP6HVJfiSopL6DJPK8QrWiSjn",
      is_auto: true,
      files: [
        {
          name: "Additional File",
          mediaType: "image/png",
          src: "ipfs://QmPPrHGV5UeG7YB9YJ1sVMhvb3NCtjPPFg8ksCtHWzuFVt",
        },
      ],
      attrs: {
        "List of Values": [
          "In an imperfect world, we are full of figures and colors that",
          "during the day absorb our energy. In this first collection I",
          "wanted to create relaxing purple geometric figures made with",
        ],
        OuterData: {
          InnerData: "String of values up to 64 characters",
          "Another Object": {
            name: "My object",
          },
        },
      },
      royalties_rate: 9,
      royalties:
        "addr_test1qzr84dy9syhkdy3ffn8c3mn8n2zh0wzhgwltz2dle5phaaky56y0ulyxyrz2mra05y8xsnxcgphrleag8m5xs0llszrkjah",
    })
  });
	
  const assetResponse = await createAssetRequest.json()
  
  console.log(assetResponse);
})();

Response

application/json

{
  "uuid": "df0d818d-3003-464b-80b1-3cfa884c1217",
  "status": "waiting",
  "blockchain": "ADA",
  "amount": 1,
  "image": "ipfs://QmbZxCkD1bniE21CPudEwRP6HVJfiSopL6DJPK8QrWiSjn",
  "mediaType": null,
  "name": "Test Name",
  "asset_name": "Only4cceptsLetters4ndNumb3rs",
  "description": null,
  "size": "573",
  "files": [
    {
      "name": "Additional File",
      "mediaType": "image/png",
      "src": "ipfs://QmPPrHGV5UeG7YB9YJ1sVMhvb3NCtjPPFg8ksCtHWzuFVt"
    }
  ],
  "attrs": {
    "List of Values": [
      "In an imperfect world, we are full of figures and colors that",
      "during the day absorb our energy. In this first collection I",
      "wanted to create relaxing purple geometric figures made with"
    ],
    "OuterData": {
      "InnerData": "String of values up to 64 characters",
      "Another Object": { "name": "My object" }
    }
  },
  "is_deleted": false,
  "created_on": "2022-04-30 16:01:57.256933+00:00",
  "updated_on": "2022-04-30 16:01:15.919623+00:00",
  "is_auto": true,
  "has_royalties": true,
  "royalties": "addr_test1qzr84dy9syhkdy3ffn8c3mn8n2zh0wzhgwltz2dle5phaaky56y0ulyxyrz2mra05y8xsnxcgphrleag8m5xs0llszrkjah",
  "royalties_rate": "9.00",
  "royalties_minted": false,
  "royalties_minted_on": null,
  "royalties_burned": false,
  "royalties_burned_on": null,
  "transaction": {
    "uuid": "9ad961bd-4b0e-4a9b-a87a-9c596768b484",
    "status": "waiting",
    "status_description": "Waiting for funds",
    "fraud_status": "unknown",
    "type": "ADA",
    "issuer_address": null,
    "policy_id": "9188cf5a70cb3fa0ce48cbacd207ad193f0f651521945b7001a1cdef",
    "invalid_slot": "59854582",
    "amount": 1,
    "cost": 7.342146,
    "convenience_fee": 2,
    "blockchain_fee": 0.221073,
    "name": "",
    "image": "",
    "description": "Asset: df0d818d-3003-464b-80b1-3cfa884c1217",
    "is_deleted": false,
    "is_minted": false,
    "is_voided": false,
    "is_resubmitted": false,
    "is_refunded": false,
    "deposit_address": "addr1vxacw4m3r2gr94t03m0v0lfly22q2h5wrht0sa2f3d8pu4cl9rjx4",
    "created_on": "2022-04-30 16:01:15.939575+00:00",
    "updated_on": "2022-04-30 16:01:55.766850+00:00",
    "is_auto_processing": false,
    "has_royalties": true,
    "royalties_minted": false,
    "royalties_minted_on": null,
    "royalties_burned": false,
    "royalties_burned_on": null,
    "royalties_rate": "9.00",
    "royalties": "addr_test1qzr84dy9syhkdy3ffn8c3mn8n2zh0wzhgwltz2dle5phaaky56y0ulyxyrz2mra05y8xsnxcgphrleag8m5xs0llszrkjah"
  }
}