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
Name | Type | Description | Required |
---|---|---|---|
invoiceID | UUID | The invoice id | Yes |
orderID | UUID | The order id | Yes |
activityName | String | Activity name Bought_Item or Sold_Item | Yes |
invoiceResType | Enum | invoice return response in pdf or base64 format | No |
Fields
Name | Type | Description |
---|---|---|
generateSecondaryInvoice | String | It 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.