Edit in GitHubLog an issue

setCustomAttributesOnInvoice mutation

The setCustomAttributesOnInvoice mutation sets custom attributes on a credit memo item. The mutation accepts a invoice ID and an array of custom attribute key/value pairs. It returns the updated invoice. All ID values are treated as strings.

To remove a custom attribute, rerun the mutation without the previously applied custom attribute.

Syntax

Copied to your clipboard
mutation {
setCustomAttributesOnInvoice(
input: InvoiceCustomAttributesInput
){
InvoiceOutput
}
}

Reference

The setCustomAttributesOnInvoice reference provides detailed information about the types and fields defined in this mutation.

Example usage

The following example sets two custom attributes on an invoice.

Request:

Copied to your clipboard
mutation {
setCustomAttributesOnInvoice(
input: {
invoice_id: "MzQ="
custom_attributes: [
{
attribute_code: "attribute_one"
value: "value_one"
},
{
attribute_code: "attribute_two"
value: "value_two"
}
]
}
) {
invoice {
id
custom_attributes {
attribute_code
value
}
}
}
}

Response:

Copied to your clipboard
{
"data": {
"setCustomAttributesOnInvoice": {
"invoice": {
"id": "MzQ=",
"custom_attributes": [
{
"attribute_code": "attribute_one",
"value": "value_one"
},
{
"attribute_code": "attribute_two",
"value": "value_two"
}
]
}
}
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.