Verify If Swap / Offer Has Been Accepted

Endpoint to check if a swap has been accepted

Retrieve Swap Status

GET https://api.withmystic.xyz/marketplace-api/verify-accepted/:swapId

Checks if the swap's status has changed and updates it to "accepted".

Path Parameters

Name
Type
Description

swapId*

String

Can be found in swap object

Headers

Name
Type
Description

Bearer token*

String

Your API key

{
   "_id":"64e7aa3a04d9a703ce46cc13",
   "orderComponents":{
      "offerer":"0xA79d4cCC70Cc3DD01f7D3a70ED5C7ca73de812C4",
      "zone":"0xF712B2B35a06016851ADd2f9c43785Ec29e243dE",
      "zoneHash":"0x0000000000000000000000000000000000000000000000000000000000000000",
      "startTime":"1692903991",
      "endTime":"115792089237316195423570985008687907853269984665640564039457584007913129639935",
      "orderType":2,
      "offer":[
         {
            "itemType":2,
            "token":"0x037aca480459ae361a87b023f189532d80cb6769",
            "identifierOrCriteria":"46",
            "startAmount":"1",
            "endAmount":"1"
         },
         {
            "itemType":2,
            "token":"0x229dd7144fec1008dddf5fcf779ec63c3d576aa7",
            "identifierOrCriteria":"36",
            "startAmount":"1",
            "endAmount":"1"
         }
      ],
      "consideration":[
         {
            "itemType":0,
            "token":"0x0000000000000000000000000000000000000000",
            "identifierOrCriteria":"0",
            "startAmount":"2970000000000000",
            "endAmount":"2970000000000000",
            "recipient":"0xA79d4cCC70Cc3DD01f7D3a70ED5C7ca73de812C4"
         },
         {
            "itemType":0,
            "token":"0x0000000000000000000000000000000000000000",
            "identifierOrCriteria":"0",
            "startAmount":"30000000000000",
            "endAmount":"30000000000000",
            "recipient":"0xF712B2B35a06016851ADd2f9c43785Ec29e243dE"
         }
      ],
      "totalOriginalConsiderationItems":2,
      "salt":"0x00000000000000000000000000000000000000000000000000000023245112a0",
      "conduitKey":"0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000",
      "counter":"0"
   },
   "chainId":5,
   "signature":"0x475863fccb42ee84f7d97e7511f3a406c69dd21ad64c9b16c92769683cbb5b2f48d4b475fee6f674992ff31075f4909b0fa7bc61d7caba0d19dee561fb3e52751c",
   "clientId":"64de82afc0885d14bbc3ab4e",
   "status":"validated",
   "transactionHash":"",
   "takerAddress":"",
   "metadata":{
      "tokensMetadata":[
         
      ],
      "nftsMetadata":[
         {
            "contract":{
               "address":"0x037aca480459ae361a87b023f189532d80cb6769",
               "name":"Red Apples",
               "symbol":"REDAPPLE",
               "totalSupply":"63",
               "tokenType":"ERC721",
               "openSea":{
                  "lastIngestedAt":"2023-08-22T07:47:00.000Z"
               },
               "contractDeployer":"0xdd305dcf8c019b2e89ccecfedd80093726f611ef",
               "deployedBlockNumber":8223329
            },
            "tokenId":"46",
            "tokenType":"ERC721",
            "title":"Apples Mock NFTS",
            "description":"This are Mock NFTS sharing the Same Image. They are used for testing in mysticswap.io",
            "timeLastUpdated":"2023-08-11T16:19:41.014Z",
            "rawMetadata":{
               "date":1672329470274,
               "image":"https://ipfs.io/ipfs/bafkreidhpw7njnpejg3ba3ygarti4nvk4paix2u6p4j3foccp3plhd2rny",
               "external_url":"https://mysticswap.io",
               "name":"Apples Mock NFTS",
               "description":"This are Mock NFTS sharing the Same Image. They are used for testing in mysticswap.io",
               "edition":1,
               "attributes":[
                  {
                     "value":"Red",
                     "trait_type":"Color"
                  },
                  {
                     "value":"Medium",
                     "trait_type":"Size"
                  }
               ]
            },
            "tokenUri":{
               "gateway":"https://alchemy.mypinata.cloud/ipfs/bafkreiaxar3ugc7wp3cumxb3albbhvodfnmbtpj5ba6sqqq3ftomwhdi4m",
               "raw":"https://ipfs.io/ipfs/bafkreiaxar3ugc7wp3cumxb3albbhvodfnmbtpj5ba6sqqq3ftomwhdi4m"
            },
            "media":[
               {
                  "gateway":"https://nft-cdn.alchemy.com/eth-goerli/62ed77fa507e8235e867d04c5217e007",
                  "thumbnail":"https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-goerli/62ed77fa507e8235e867d04c5217e007",
                  "raw":"https://ipfs.io/ipfs/bafkreidhpw7njnpejg3ba3ygarti4nvk4paix2u6p4j3foccp3plhd2rny",
                  "format":"jpeg",
                  "bytes":55186
               }
            ]
         },
         {
            "contract":{
               "address":"0x229dd7144fec1008dddf5fcf779ec63c3d576aa7",
               "name":"Oranges",
               "symbol":"ORANGE",
               "totalSupply":"46",
               "tokenType":"ERC721",
               "openSea":{
                  "lastIngestedAt":"2023-08-23T13:27:21.000Z"
               },
               "contractDeployer":"0xdd305dcf8c019b2e89ccecfedd80093726f611ef",
               "deployedBlockNumber":8226244
            },
            "tokenId":"36",
            "tokenType":"ERC721",
            "title":"Orange Mock NFTS",
            "description":"This are Mock NFTS sharing the Same Image. They are used for testing in mysticswap.io",
            "timeLastUpdated":"2023-08-11T16:19:41.866Z",
            "rawMetadata":{
               "date":1672329470274,
               "image":"https://ipfs.io/ipfs/bafkreid6lpiyizkjyl2fexdizbovhfl3ncl4ma32zuvev3v6lnsbkvfdtm",
               "external_url":"https://mysticswap.io",
               "name":"Orange Mock NFTS",
               "description":"This are Mock NFTS sharing the Same Image. They are used for testing in mysticswap.io",
               "edition":1,
               "attributes":[
                  {
                     "value":"Yellow",
                     "trait_type":"Color"
                  },
                  {
                     "value":"Large",
                     "trait_type":"Size"
                  }
               ]
            },
            "tokenUri":{
               "gateway":"https://alchemy.mypinata.cloud/ipfs/bafkreiaktvjzpks4y5cxmf7lyiiwp5gcqxzizoe7lvp47ia5ronrrlsfd4",
               "raw":"https://ipfs.io/ipfs/bafkreiaktvjzpks4y5cxmf7lyiiwp5gcqxzizoe7lvp47ia5ronrrlsfd4"
            },
            "media":[
               {
                  "gateway":"https://nft-cdn.alchemy.com/eth-goerli/f4880a8ea160bf037d32e71c0dd83786",
                  "thumbnail":"https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-goerli/f4880a8ea160bf037d32e71c0dd83786",
                  "raw":"https://ipfs.io/ipfs/bafkreid6lpiyizkjyl2fexdizbovhfl3ncl4ma32zuvev3v6lnsbkvfdtm",
                  "format":"jpeg",
                  "bytes":41777
               }
            ]
         }
      ]
   },
   "createdAt":"2023-08-24T19:06:34.835Z",
   "updatedAt":"2023-08-24T19:06:34.835Z",
   "__v":0
}

Example

Let's simulate verifying if the swap that was accepted in the Validate Swap / Offer example has been updated as "accepted". In this case, what we'd query the API with would be:

https://api.withmystic.xyz/marketplace-api/verify-accepted/63fa3005750c34a30f1a8a8d

And here we can find the response we would get from making this call (mock values):

{
   "_id":"64e7aa3a04d9a703ce46cc13",
   "orderComponents":{
      "offerer":"0xA79d4cCC70Cc3DD01f7D3a70ED5C7ca73de812C4",
      "zone":"0xF712B2B35a06016851ADd2f9c43785Ec29e243dE",
      "zoneHash":"0x0000000000000000000000000000000000000000000000000000000000000000",
      "startTime":"1692903991",
      "endTime":"115792089237316195423570985008687907853269984665640564039457584007913129639935",
      "orderType":2,
      "offer":[
         {
            "itemType":2,
            "token":"0x037aca480459ae361a87b023f189532d80cb6769",
            "identifierOrCriteria":"46",
            "startAmount":"1",
            "endAmount":"1"
         },
         {
            "itemType":2,
            "token":"0x229dd7144fec1008dddf5fcf779ec63c3d576aa7",
            "identifierOrCriteria":"36",
            "startAmount":"1",
            "endAmount":"1"
         }
      ],
      "consideration":[
         {
            "itemType":0,
            "token":"0x0000000000000000000000000000000000000000",
            "identifierOrCriteria":"0",
            "startAmount":"2970000000000000",
            "endAmount":"2970000000000000",
            "recipient":"0xA79d4cCC70Cc3DD01f7D3a70ED5C7ca73de812C4"
         },
         {
            "itemType":0,
            "token":"0x0000000000000000000000000000000000000000",
            "identifierOrCriteria":"0",
            "startAmount":"30000000000000",
            "endAmount":"30000000000000",
            "recipient":"0xF712B2B35a06016851ADd2f9c43785Ec29e243dE"
         }
      ],
      "totalOriginalConsiderationItems":2,
      "salt":"0x00000000000000000000000000000000000000000000000000000023245112a0",
      "conduitKey":"0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000",
      "counter":"0"
   },
   "chainId":5,
   "signature":"0x475863fccb42ee84f7d97e7511f3a406c69dd21ad64c9b16c92769683cbb5b2f48d4b475fee6f674992ff31075f4909b0fa7bc61d7caba0d19dee561fb3e52751c",
   "clientId":"64de82afc0885d14bbc3ab4e",
   "status":"validated",
   "transactionHash":"",
   "takerAddress":"",
   "metadata":{
      "tokensMetadata":[
         
      ],
      "nftsMetadata":[
         {
            "contract":{
               "address":"0x037aca480459ae361a87b023f189532d80cb6769",
               "name":"Red Apples",
               "symbol":"REDAPPLE",
               "totalSupply":"63",
               "tokenType":"ERC721",
               "openSea":{
                  "lastIngestedAt":"2023-08-22T07:47:00.000Z"
               },
               "contractDeployer":"0xdd305dcf8c019b2e89ccecfedd80093726f611ef",
               "deployedBlockNumber":8223329
            },
            "tokenId":"46",
            "tokenType":"ERC721",
            "title":"Apples Mock NFTS",
            "description":"This are Mock NFTS sharing the Same Image. They are used for testing in mysticswap.io",
            "timeLastUpdated":"2023-08-11T16:19:41.014Z",
            "rawMetadata":{
               "date":1672329470274,
               "image":"https://ipfs.io/ipfs/bafkreidhpw7njnpejg3ba3ygarti4nvk4paix2u6p4j3foccp3plhd2rny",
               "external_url":"https://mysticswap.io",
               "name":"Apples Mock NFTS",
               "description":"This are Mock NFTS sharing the Same Image. They are used for testing in mysticswap.io",
               "edition":1,
               "attributes":[
                  {
                     "value":"Red",
                     "trait_type":"Color"
                  },
                  {
                     "value":"Medium",
                     "trait_type":"Size"
                  }
               ]
            },
            "tokenUri":{
               "gateway":"https://alchemy.mypinata.cloud/ipfs/bafkreiaxar3ugc7wp3cumxb3albbhvodfnmbtpj5ba6sqqq3ftomwhdi4m",
               "raw":"https://ipfs.io/ipfs/bafkreiaxar3ugc7wp3cumxb3albbhvodfnmbtpj5ba6sqqq3ftomwhdi4m"
            },
            "media":[
               {
                  "gateway":"https://nft-cdn.alchemy.com/eth-goerli/62ed77fa507e8235e867d04c5217e007",
                  "thumbnail":"https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-goerli/62ed77fa507e8235e867d04c5217e007",
                  "raw":"https://ipfs.io/ipfs/bafkreidhpw7njnpejg3ba3ygarti4nvk4paix2u6p4j3foccp3plhd2rny",
                  "format":"jpeg",
                  "bytes":55186
               }
            ]
         },
         {
            "contract":{
               "address":"0x229dd7144fec1008dddf5fcf779ec63c3d576aa7",
               "name":"Oranges",
               "symbol":"ORANGE",
               "totalSupply":"46",
               "tokenType":"ERC721",
               "openSea":{
                  "lastIngestedAt":"2023-08-23T13:27:21.000Z"
               },
               "contractDeployer":"0xdd305dcf8c019b2e89ccecfedd80093726f611ef",
               "deployedBlockNumber":8226244
            },
            "tokenId":"36",
            "tokenType":"ERC721",
            "title":"Orange Mock NFTS",
            "description":"This are Mock NFTS sharing the Same Image. They are used for testing in mysticswap.io",
            "timeLastUpdated":"2023-08-11T16:19:41.866Z",
            "rawMetadata":{
               "date":1672329470274,
               "image":"https://ipfs.io/ipfs/bafkreid6lpiyizkjyl2fexdizbovhfl3ncl4ma32zuvev3v6lnsbkvfdtm",
               "external_url":"https://mysticswap.io",
               "name":"Orange Mock NFTS",
               "description":"This are Mock NFTS sharing the Same Image. They are used for testing in mysticswap.io",
               "edition":1,
               "attributes":[
                  {
                     "value":"Yellow",
                     "trait_type":"Color"
                  },
                  {
                     "value":"Large",
                     "trait_type":"Size"
                  }
               ]
            },
            "tokenUri":{
               "gateway":"https://alchemy.mypinata.cloud/ipfs/bafkreiaktvjzpks4y5cxmf7lyiiwp5gcqxzizoe7lvp47ia5ronrrlsfd4",
               "raw":"https://ipfs.io/ipfs/bafkreiaktvjzpks4y5cxmf7lyiiwp5gcqxzizoe7lvp47ia5ronrrlsfd4"
            },
            "media":[
               {
                  "gateway":"https://nft-cdn.alchemy.com/eth-goerli/f4880a8ea160bf037d32e71c0dd83786",
                  "thumbnail":"https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-goerli/f4880a8ea160bf037d32e71c0dd83786",
                  "raw":"https://ipfs.io/ipfs/bafkreid6lpiyizkjyl2fexdizbovhfl3ncl4ma32zuvev3v6lnsbkvfdtm",
                  "format":"jpeg",
                  "bytes":41777
               }
            ]
         }
      ]
   },
   "createdAt":"2023-08-24T19:06:34.835Z",
   "updatedAt":"2023-08-24T19:06:34.835Z",
   "__v":0
}

Here is an example API call, for you to copy and modify:

https://api.withmystic.xyz/marketplace-api/verify-accepted/:id

Happy coding!

Last updated