getInvoicesDetails

This query retrieves invoice details by ID. This is currently used by microservice.

General Pattern

query{
    getInvoicesDetails(invoiceID: "UUID1", orgID: "UUID1"){
    field_1
    field_2 {
       nested_field_1
       ...
    }
  }
}

Sample Query

query{
  getInvoiceDetails(invoiceID:"af7649f8-5c6e-4de4-b688-20a97b316726" orgID:"8fb128bd-f55d-4bcc-8b6c-0beb684e4d4e"){
    invoiceID
    invoiceNumber
    invoiceCreatedAt
    externalUserID
    internalUserID
    status
    paymentID
    items{
      collectionItemID
      collectionTitle
      collectionItemTitle
      destinationAddress
      units
      unitPrice
      buyersPremium
      overheadPremium
      totalPrice
      saleDate
      taxes
      salesTaxRate
    }
  }
}

Sample response

{
  "data": {
    "getInvoiceDetails": {
      "invoiceID": "af7649f8-5c6e-4de4-b688-20a97b316726",
      "invoiceNumber": 737,
      "invoiceCreatedAt": "2022-03-09T16:13:22Z",
      "externalUserID": "auth0|5e1cd5d367ed990e88f647f3",
      "internalUserID": "196f2a18-30d8-4781-a372-83cdc966004f",
      "status": "Paid",
      "paymentID": "84afdda5-f867-462f-bc2d-1fb011eac12b",
      "items": [
        {
          "collectionItemID": "62d523a1-978c-48d9-b371-fd8e20da0e15",
          "collectionTitle": "LFC Heroes",
          "collectionItemTitle": "LFC Heroes",
          "destinationAddress": "0xAc14D1dd976B5FE763d50a6e5fDfF0675431AD0F",
          "units": 1,
          "unitPrice": 75,
          "buyersPremium": 0,
          "overheadPremium": 0,
          "totalPrice": 75,
          "saleDate": "2022-03-09T16:13:22Z",
          "taxes": 0,
          "salesTaxRate": 0
        }
      ]
    }
  }
}

Arguments

Name

Type

Description

Required

invoiceID

UUID1

The invoice ID.

Yes

orgID

UUID1

The organization ID.

Yes

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.

Example

Load the invoice detail using invoice ID and organization ID: