getDiscountCodes

This query retrieves the discount codes using the invoice item ID.

General Pattern

{
  getDiscountCodes(invoiceItemID:UUID!){
    field_1
    field_2 {
       nested_field_1
       ...
    }
  }
}

Sample Query

query{
  getDiscountCodes(invoiceItemID:"30d256e4-7a27-4657-8426-79e0d6a7bdb3"){
    id
    discountCode
    discountType
    description
    value
    organizationID
  }
}

Sample Response

{
  "data": {
    "getDiscountCodes": []
  }
}

Argument

Name

Type

Description

Required

invoiceItemId

UUID

The ID of an invoice item.

Yes

Response

Name

Type

Description

DiscountCodes

Object

An object that contains the DiscountCodes object information, such as the discount code ID, discount type, etc.

Example

Get the discount code by the invoice item ID: