generateSecondaryInvoices

Generate the secondary invoice by invoice id , response return in base64 and pdf format.

Sample query

query (
  $invoiceID: UUID1!
  $orderID: UUID1!
  $activityName: ActivityName!
  $invoiceResType: InvoiceResType
) {
  generateSecondaryInvoice(
    invoiceID: $invoiceID
    orderID: $orderID
    activityName: $activityName
    invoiceResType: $invoiceResType
  )
}

Sample variable

{
  "invoiceID": "56e70a04-8353-4754-ae35-89fd9539803d",
  "orderID": "f5954ed0-4d82-4947-b877-b9d89ad0a120",
  "activityName": "Bought_Item",
  "invoiceResType": "pdf"
}

Sample response

{
  "data": {
    "generateSecondaryInvoice": "https://storage.googleapis.com/mojito-dev-public/organizations/8fb128bd-f55d-4bcc-8b6c-0beb684e4d4e/invoices/56e70a04-8353-4754-ae35-89fd9539803d_buyer.pdf"
  }
}

Arguments

NameTypeDescriptionRequired
invoiceIDUUIDThe invoice idYes
orderIDUUIDThe order idYes
activityNameStringActivity name Bought_Item or Sold_ItemYes
invoiceResTypeEnuminvoice return response in pdfor base64 formatNo

Fields

NameTypeDescription
generateSecondaryInvoiceStringIt returns the invoice against the sale in format of pdf or base64 depending on param.

Example

Load the secondary invoice in base64 and pdf format.