This query retrieves invoices that are owned by a user.
General Pattern
query{
getMyInvoices{
field_1
field_2 {
nested_field_1
...
}
}
}
Sample Query
query{
getMyInvoices{
invoiceID
invoiceNumber
invoiceCreatedAt
internalUserID
status
cryptoAmount
items{
collectionTitle
collectionItemTitle
collectionItemID
totalPrice
units
unitPrice
nftDetails{
onChainId
contractAddress
tokenMetadata{
name
description
animationURL
image
attributes{
traitType
value{
... on AttributeValueString{
stringValue
}
... on AttributeValueInt{
intValue
}
... on AttributeValueFloat{
floatValue
}
... on AttributeValueBool{
boolValue
}
}
}
}
}
}
}
}
Sample Response
{
"data": {
"getMyInvoices": [
{
"invoiceID": "6b88cb45-a698-4747-9fb3-73aa8633ee7c",
"invoiceNumber": 41476,
"invoiceCreatedAt": "2023-07-18T17:30:01Z",
"internalUserID": "548b1c10-b609-4e3b-bb07-d9fdb9ff9ef8",
"status": "Paid",
"cryptoAmount": 0.008,
"items": [
{
"collectionTitle": "Mercedes Dutch Auction Test",
"collectionItemTitle": "MDAT-9",
"collectionItemID": "933edb5c-392e-473c-bfd5-8d6895261dc3",
"totalPrice": 15.091520000000001,
"units": 1,
"unitPrice": 15.091520000000001,
"nftDetails":[{
"onChainId": "1",
"contractAddress": "0x817dd1fc49a213f147e19699322b0224260715b6",
"tokenMetadata": {
"name": "GNT#4",
"description": "Each NFT within the collection is unique and cannot be replicated or duplicated. It ensures the authenticity and scarcity of the digital car representation, mimicking the characteristics of rare or limited-edition physical cars.",
"animationURL": "https://storage.googleapis.com/mojito-prod-public/organizations/d4191c0a-8020-4a6a-bdb9-461d92b8c2de/images/d66c44d3-a3e3-483a-bf07-593681b5c7c7.mp4?z=1",
"image": "https://storage.googleapis.com/mojito-dev-public/organizations/5eb26a32-2a2f-4f4a-88fa-e92fad02b67d/images/3ae71abc-e869-4364-87e3-3ccb139d9e30.jpeg?z=1",
"attributes": [
{
"traitType": "Vehicle Model",
"value": {
"stringValue": "Beast IMM 101"
}
},
{
"traitType": "Vehicle Color",
"value": {
"stringValue": "Red"
}
},
{
"traitType": "Card Effect",
"value": {
"stringValue": "Clear"
}
},
{
"traitType": "Card Front",
"value": {
"stringValue": "Brown"
}
},
{
"traitType": "Card Back",
"value": {
"stringValue": "Black"
}
},
{
"traitType": "Era Name",
"value": {
"stringValue": "Current"
}
},
{
"traitType": "Construction Year",
"value": {
"stringValue": "2023"
}
},
{
"traitType": "Model Code",
"value": {
"stringValue": "TBT 133"
}
},
{
"traitType": "Number of cylinders",
"value": {
"stringValue": "V10"
}
},
{
"traitType": "Displacement",
"value": {
"stringValue": "5 cc"
}
},
{
"traitType": "Output",
"value": {
"stringValue": "420 kW/600 PS"
}
},
{
"traitType": "Top Speed",
"value": {
"stringValue": "210 Km/h"
}
},
{
"traitType": "Height",
"value": {
"stringValue": "15mm"
}
},
{
"traitType": "Width",
"value": {
"stringValue": "20mm"
}
},
{
"traitType": "Weight",
"value": {
"stringValue": "100 Kgs"
}
},
{
"traitType": "Number of seats",
"value": {
"stringValue": "2"
}
}
]
},
"mintedAt": "2023-07-11T17:36:29+05:30"
}]
}
]
}
]
}
}
Fields
Name | Type | Description |
---|---|---|
InvoiceDetails | Object | Contains all the information from InvoiceDetails such as the ID, the invoice ID, the invoice created ID, the external user ID, the internal user ID, and etc. |