The getOffers query retrieves the details of token offers and their statuses. The behavior on the front end should vary based on the status, the owner's address, and whether the token owner or the buyer calls this API.
- Token Owner Perspective:
- If the token owner calls this API and an offer is in the 
PENDINGstatus, the front end should display options to:- Accept Offer
 - Reject Offer
 
 
 - If the token owner calls this API and an offer is in the 
 - Buyer Perspective:
- If the buyer calls this API and the offer is in the 
PENDINGstatus, the front end should display the option to:- Cancel Offer
 
 
 - If the buyer calls this API and the offer is in the 
 
By handling the status, owner address, and buyer address, the front end can determine the appropriate actions for both the token owner and buyer.
Sample query
query getOffersQuery($nftTokenId: UUID1!, $orgId: UUID1!, $buyerAddress: String, $walletAddress: String, $gatedOffers: Boolean, $currency: CurrencyCodeFiat) {
  getOffers(
    orgId: $orgId
    nftTokenId: $nftTokenId
    buyerAddress: $buyerAddress
    walletAddress: $walletAddress
    gatedOffers: $gatedOffers
    currency: $currency
  ) {
    id
    offerExpiryDate
    nftOwnerAddress
    tokenType
    tokenId
    tokenContract
    orderStatus
    buyerTax
    buyerAddress
    fixedPrice
    updatedAt
    createdAt
    price {
      value
      unit
      type
      __typename
    }
    createdBy {
      id
      username
      __typename
    }
    createdByUserOrganization {
      username
      __typename
    }
    __typename
  }
}Sample variable
{
  "nftTokenId": "021272bc-e41b-412f-8631-f63304a6d3a6",
  "orgId": "0db10bbf-85fe-4c87-911b-d18f8568fc07",
  "currency": "USD"
}Sample response
{
  "data": {
    "getOffers": [
      {
        "id": "e1d81933-37bc-4d86-bc01-ad33551d3930",
        "offerExpiryDate": "2025-01-21T12:21:32Z",
        "nftOwnerAddress": "7GckBHDKCMEdFdnxJV3qY12YCEVop6MKtgjVAnd7vHGD",
        "tokenType": "NonFungible",
        "tokenId": "7dDe5D6N16tkuM53RKEuKJ7gZDiB7NC6oyQKP2AQJDSc",
        "tokenContract": "FytWTAobotGfihugTU8TEQzEgjfrttUVNWcRHv1GG2G3",
        "orderStatus": "REJECTED",
        "buyerTax": 0,
        "buyerAddress": "AhE1ubLPzT6vY1rWFoPko5DSC3rpQUhLMjdEiWV1mJGh",
        "fixedPrice": 1,
        "updatedAt": "2025-01-20T12:22:31.830433Z",
        "createdAt": "2025-01-20T12:21:33.978794Z",
        "price": [
          {
            "value": 0.0394,
            "unit": "USD",
            "type": "FIAT",
            "__typename": "NFTPrice"
          },
          {
            "value": 1,
            "unit": "VIN",
            "type": "CRYPTO",
            "__typename": "NFTPrice"
          }
        ],
        "createdBy": {
          "id": "b14273de-a246-4eee-8f52-8e560b548def",
          "username": "4d6207ba-8f3e-4f2e-bd6c-4c2a2d4d29e4",
          "__typename": "User"
        },
        "createdByUserOrganization": {
          "username": null,
          "__typename": "UserOrganization"
        },
        "__typename": "Order"
      },
      {
        "id": "daf8733d-7c27-43c5-9dc5-a6b9a4705017",
        "offerExpiryDate": "2025-01-21T10:40:38Z",
        "nftOwnerAddress": "7GckBHDKCMEdFdnxJV3qY12YCEVop6MKtgjVAnd7vHGD",
        "tokenType": "NonFungible",
        "tokenId": "7dDe5D6N16tkuM53RKEuKJ7gZDiB7NC6oyQKP2AQJDSc",
        "tokenContract": "FytWTAobotGfihugTU8TEQzEgjfrttUVNWcRHv1GG2G3",
        "orderStatus": "CANCELLED",
        "buyerTax": 0,
        "buyerAddress": "AhE1ubLPzT6vY1rWFoPko5DSC3rpQUhLMjdEiWV1mJGh",
        "fixedPrice": 1,
        "updatedAt": "2025-01-20T11:18:17.196111Z",
        "createdAt": "2025-01-20T10:40:50.819144Z",
        "price": [
          {
            "value": 0.0394,
            "unit": "USD",
            "type": "FIAT",
            "__typename": "NFTPrice"
          },
          {
            "value": 1,
            "unit": "VIN",
            "type": "CRYPTO",
            "__typename": "NFTPrice"
          }
        ],
        "createdBy": {
          "id": "b14273de-a246-4eee-8f52-8e560b548def",
          "username": "4d6207ba-8f3e-4f2e-bd6c-4c2a2d4d29e4",
          "__typename": "User"
        },
        "createdByUserOrganization": {
          "username": null,
          "__typename": "UserOrganization"
        },
        "__typename": "Order"
      },
      {
        "id": "af9acbaa-5c6a-426b-b84d-f90f1a54c3dc",
        "offerExpiryDate": "2025-01-01T01:46:51Z",
        "nftOwnerAddress": "7GckBHDKCMEdFdnxJV3qY12YCEVop6MKtgjVAnd7vHGD",
        "tokenType": "NonFungible",
        "tokenId": "7dDe5D6N16tkuM53RKEuKJ7gZDiB7NC6oyQKP2AQJDSc",
        "tokenContract": "FytWTAobotGfihugTU8TEQzEgjfrttUVNWcRHv1GG2G3",
        "orderStatus": "CANCELLED",
        "buyerTax": 0,
        "buyerAddress": "HHC7mBcHwUAJXufKFCaXJJDoJNwvRp1vfuqVW4NxpHq9",
        "fixedPrice": 1,
        "updatedAt": "2024-12-31T01:47:37.339309Z",
        "createdAt": "2024-12-31T01:46:53.129646Z",
        "price": [
          {
            "value": 0.0394,
            "unit": "USD",
            "type": "FIAT",
            "__typename": "NFTPrice"
          },
          {
            "value": 1,
            "unit": "VIN",
            "type": "CRYPTO",
            "__typename": "NFTPrice"
          }
        ],
        "createdBy": {
          "id": "600e75e1-e261-4424-9b74-9d870fac5715",
          "username": "ba10fd6f-7da5-4b8c-923c-93fe49ffc447",
          "__typename": "User"
        },
        "createdByUserOrganization": {
          "username": null,
          "__typename": "UserOrganization"
        },
        "__typename": "Order"
      },
      {
        "id": "188d9fb0-b2c8-47b4-8990-d5dced960db1",
        "offerExpiryDate": "2025-01-05T13:17:07Z",
        "nftOwnerAddress": "7GckBHDKCMEdFdnxJV3qY12YCEVop6MKtgjVAnd7vHGD",
        "tokenType": "NonFungible",
        "tokenId": "7dDe5D6N16tkuM53RKEuKJ7gZDiB7NC6oyQKP2AQJDSc",
        "tokenContract": "FytWTAobotGfihugTU8TEQzEgjfrttUVNWcRHv1GG2G3",
        "orderStatus": "REJECTED",
        "buyerTax": 0,
        "buyerAddress": "2ChiKGV1NPmoHu5fjEp9mbMY7t37kX5gD4QftMo9shs3",
        "fixedPrice": 2,
        "updatedAt": "2024-12-16T07:22:19.05124Z",
        "createdAt": "2024-12-06T13:17:11.1959Z",
        "price": [
          {
            "value": 0.0788,
            "unit": "USD",
            "type": "FIAT",
            "__typename": "NFTPrice"
          },
          {
            "value": 2,
            "unit": "VIN",
            "type": "CRYPTO",
            "__typename": "NFTPrice"
          }
        ],
        "createdBy": {
          "id": "0d96378a-2836-4caf-9f8f-74ff3a7165d3",
          "username": "26dedc09-58dc-416d-a8f3-2c41dbb3a683",
          "__typename": "User"
        },
        "createdByUserOrganization": {
          "username": null,
          "__typename": "UserOrganization"
        },
        "__typename": "Order"
      },
      {
        "id": "0a4b7c86-8efc-45f9-a750-c3b2debb1051",
        "offerExpiryDate": "2024-12-10T13:18:53Z",
        "nftOwnerAddress": "7GckBHDKCMEdFdnxJV3qY12YCEVop6MKtgjVAnd7vHGD",
        "tokenType": "NonFungible",
        "tokenId": "7dDe5D6N16tkuM53RKEuKJ7gZDiB7NC6oyQKP2AQJDSc",
        "tokenContract": "FytWTAobotGfihugTU8TEQzEgjfrttUVNWcRHv1GG2G3",
        "orderStatus": "EXPIRED",
        "buyerTax": 0,
        "buyerAddress": "F1CjfyuW4D9UUJuvDRnacT1b9oDCY55ebYjgFeSKZcjh",
        "fixedPrice": 20,
        "updatedAt": "2024-12-10T15:00:05.95447Z",
        "createdAt": "2024-12-09T13:18:56.059068Z",
        "price": [
          {
            "value": 0.788,
            "unit": "USD",
            "type": "FIAT",
            "__typename": "NFTPrice"
          },
          {
            "value": 20,
            "unit": "VIN",
            "type": "CRYPTO",
            "__typename": "NFTPrice"
          }
        ],
        "createdBy": {
          "id": "2fba4e4f-0852-4e48-aa92-82803051aae3",
          "username": "1dbcc338-251d-41e1-9ad8-7bee07ebe9c8",
          "__typename": "User"
        },
        "createdByUserOrganization": {
          "username": null,
          "__typename": "UserOrganization"
        },
        "__typename": "Order"
      }
    ]
  }
}Field
The table below provides an explanation of each variable in the respective column.
| Name | Type | Description | 
|---|---|---|
nftTokenId | UUID1 | The NFT token ID. | 
orgId | UUID1 | The organization ID. | 
currency | Enum | This will decide to show sale currency converted into fiat currency amount, i.e USD,EUR | 
