getMyInvoices

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(returnAllStatuses:true){
    invoiceID
    invoiceNumber
    invoiceCreatedAt
    internalUserID
    status
    cryptoAmount
    items{
      invoiceItemID
      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": "f2f77faf-f496-4565-a745-e0a1f7ad0102",
        "invoiceNumber": 27741,
        "invoiceCreatedAt": "2023-10-24T13:09:59Z",
        "internalUserID": "f2c4a3ca-7176-4cca-a376-e23c3b064dfd",
        "status": "Paid",
        "cryptoAmount": 0,
        "items": [
          {
            "invoiceItemID": "3889b16b-9820-4e35-933c-5d4bab231e15",
            "collectionTitle": "",
            "collectionItemTitle": "claim for redeem",
            "collectionItemID": "dff3c5ee-2d49-47e2-835c-5fef0492861a",
            "totalPrice": 0,
            "units": 1,
            "unitPrice": 0,
            "nftDetails": [
              {
                "onChainId": "1",
                "contractAddress": "0xde4BE0751DDFcB26812F201be4Ab125Fcf6ae960",
                "tokenMetadata": {
                  "name": "Test",
                  "description": "teststaqes",
                  "animationURL": null,
                  "image": "https://storage.googleapis.com/mojito-sandbox-public/organizations/5eb26a32-2a2f-4f4a-88fa-e92fad02b67d/images/8b3aab25-19c8-4687-9b50-280d28af7943.jpg?z=1",
                  "attributes": null
                }
              }
            ]
          }
        ]
      },
      {
        "invoiceID": "29a1da6a-2d2c-43b9-a359-f5104cf344bf",
        "invoiceNumber": 26946,
        "invoiceCreatedAt": "2023-09-02T11:41:03Z",
        "internalUserID": "f2c4a3ca-7176-4cca-a376-e23c3b064dfd",
        "status": "Pending",
        "cryptoAmount": 0,
        "items": [
          {
            "invoiceItemID": "1d53c723-d783-4331-b937-78b90ef15a8b",
            "collectionTitle": "",
            "collectionItemTitle": "Onchain Buynow B",
            "collectionItemID": "c0776cd2-f9c6-4fbe-a65e-ec7557cb1ee0",
            "totalPrice": 1,
            "units": 1,
            "unitPrice": 1,
            "nftDetails": null
          }
        ]
      },
      {
        "invoiceID": "337f31ef-f0f7-4128-aebd-faa8b0919298",
        "invoiceNumber": 26945,
        "invoiceCreatedAt": "2023-09-02T11:40:40Z",
        "internalUserID": "f2c4a3ca-7176-4cca-a376-e23c3b064dfd",
        "status": "Expired",
        "cryptoAmount": 0,
        "items": [
          {
            "invoiceItemID": "5c082dd5-cbd4-4ddc-b343-64fb490f1213",
            "collectionTitle": "",
            "collectionItemTitle": "Onchain Buynow B",
            "collectionItemID": "c0776cd2-f9c6-4fbe-a65e-ec7557cb1ee0",
            "totalPrice": 1,
            "units": 1,
            "unitPrice": 1,
            "nftDetails": null
          }
        ]
      },
      {
        "invoiceID": "ee1be50b-9b97-49de-8491-a8dcd3bc732b",
        "invoiceNumber": 26944,
        "invoiceCreatedAt": "2023-09-02T11:28:04Z",
        "internalUserID": "f2c4a3ca-7176-4cca-a376-e23c3b064dfd",
        "status": "Pending",
        "cryptoAmount": 0,
        "items": [
          {
            "invoiceItemID": "3d2c5e4f-dd1c-4ec5-95c9-337a8abea4a1",
            "collectionTitle": "",
            "collectionItemTitle": "Onchain Buynow B",
            "collectionItemID": "c0776cd2-f9c6-4fbe-a65e-ec7557cb1ee0",
            "totalPrice": 1,
            "units": 1,
            "unitPrice": 1,
            "nftDetails": null
          }
        ]
      },
      {
        "invoiceID": "bbf54d9b-a858-4e36-9f64-51acac37dfe5",
        "invoiceNumber": 26943,
        "invoiceCreatedAt": "2023-09-02T11:07:32Z",
        "internalUserID": "f2c4a3ca-7176-4cca-a376-e23c3b064dfd",
        "status": "Expired",
        "cryptoAmount": 0,
        "items": [
          {
            "invoiceItemID": "b589bed7-33f2-4325-92a5-c4c92889338e",
            "collectionTitle": "",
            "collectionItemTitle": "Onchain Buynow B",
            "collectionItemID": "c0776cd2-f9c6-4fbe-a65e-ec7557cb1ee0",
            "totalPrice": 1,
            "units": 1,
            "unitPrice": 1,
            "nftDetails": null
          }
        ]
      },
      {
        "invoiceID": "aaaa7696-b7a0-4e1f-bbdf-08df44d34a83",
        "invoiceNumber": 26492,
        "invoiceCreatedAt": "2023-07-24T16:27:37Z",
        "internalUserID": "f2c4a3ca-7176-4cca-a376-e23c3b064dfd",
        "status": "Expired",
        "cryptoAmount": 0,
        "items": [
          {
            "invoiceItemID": "070ea83f-c2fb-412c-9d75-330685545aab",
            "collectionTitle": "",
            "collectionItemTitle": "buynow list",
            "collectionItemID": "6c314470-d59d-4137-adf0-54b3afdae8af",
            "totalPrice": 1,
            "units": 1,
            "unitPrice": 1,
            "nftDetails": null
          }
        ]
      },
      {
        "invoiceID": "da8bcf97-e479-4336-ae6b-8c2248dd6156",
        "invoiceNumber": 26482,
        "invoiceCreatedAt": "2023-07-24T11:43:53Z",
        "internalUserID": "f2c4a3ca-7176-4cca-a376-e23c3b064dfd",
        "status": "Expired",
        "cryptoAmount": 0,
        "items": [
          {
            "invoiceItemID": "be9626df-227a-44a4-96b5-f0a53bbd90d4",
            "collectionTitle": "",
            "collectionItemTitle": "OND List",
            "collectionItemID": "14646758-8422-4ae1-aaf6-ba0640f86956",
            "totalPrice": 1,
            "units": 1,
            "unitPrice": 1,
            "nftDetails": null
          }
        ]
      },
      {
        "invoiceID": "fb9ac225-f0ca-4ce4-ad29-e9027557de2f",
        "invoiceNumber": 26481,
        "invoiceCreatedAt": "2023-07-24T10:15:21Z",
        "internalUserID": "f2c4a3ca-7176-4cca-a376-e23c3b064dfd",
        "status": "Expired",
        "cryptoAmount": 0,
        "items": [
          {
            "invoiceItemID": "4b30c4b6-34b1-426a-9a11-6f48bdb10a16",
            "collectionTitle": "",
            "collectionItemTitle": "OND List",
            "collectionItemID": "14646758-8422-4ae1-aaf6-ba0640f86956",
            "totalPrice": 1,
            "units": 1,
            "unitPrice": 1,
            "nftDetails": null
          }
        ]
      },
      {
        "invoiceID": "a4a8d732-2b07-4b95-aef5-939f3243a2b9",
        "invoiceNumber": 26476,
        "invoiceCreatedAt": "2023-07-24T09:41:00Z",
        "internalUserID": "f2c4a3ca-7176-4cca-a376-e23c3b064dfd",
        "status": "Expired",
        "cryptoAmount": 0,
        "items": [
          {
            "invoiceItemID": "9f60b67f-9d80-481a-ba68-613371f944a5",
            "collectionTitle": "",
            "collectionItemTitle": "OND List",
            "collectionItemID": "14646758-8422-4ae1-aaf6-ba0640f86956",
            "totalPrice": 1,
            "units": 1,
            "unitPrice": 1,
            "nftDetails": null
          }
        ]
      }
    ]
  }
}

Fields

NameTypeDescription
InvoiceDetailsObjectContains 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.