API version: unstable
API version: 2021-04 Release candidate
API version: 2021-01 Latest
API version: 2020-10
API version: 2020-07
API version: 2020-04
API version: 2020-01 Unsupported
API version: 2019-10 Unsupported

priceRuleDiscountCodeUpdate mutation

Version unstable

Update a discount code for a price rule.

Required access

write_price_rules access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
code ( String! ) required

The new code of a price rule.

priceRuleId ( ID! ) required

The ID of the price rule object.

Return fields

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use priceRuleUserErrors instead

Version 2021-04 (Release candidate)

Update a discount code for a price rule.

Required access

write_price_rules access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
code ( String! ) required

The new code of a price rule.

priceRuleId ( ID! ) required

The ID of the price rule object.

Return fields

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use priceRuleUserErrors instead

Version 2021-01 (Latest)

Update a discount code for a price rule.

Required access

write_price_rules access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
code ( String! ) required

The new code of a price rule.

priceRuleId ( ID! ) required

The ID of the price rule object.

Return fields

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use priceRuleUserErrors instead

Version 2020-10

Update a discount code for a price rule.

Required access

write_price_rules access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
code ( String! ) required

The new code of a price rule.

priceRuleId ( ID! ) required

The ID of the price rule object.

Return fields

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use priceRuleUserErrors instead

Version 2020-07

Update a discount code for a price rule.

Required access

write_price_rules access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
code ( String! ) required

The new code of a price rule.

priceRuleId ( ID! ) required

The ID of the price rule object.

Return fields

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use priceRuleUserErrors instead

Version 2020-04

Update a discount code for a price rule.

Required access

write_price_rules access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
code ( String! ) required

The new code of a price rule.

priceRuleId ( ID! ) required

The ID of the price rule object.

Return fields

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use priceRuleUserErrors instead

Version 2020-01 (Unsupported)

Update a discount code for a price rule.

Required access

write_price_rules access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
code ( String! ) required

The new code of a price rule.

priceRuleId ( ID! ) required

The ID of the price rule object.

Return fields

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use priceRuleUserErrors instead

Version 2019-10 (Unsupported)

Update a discount code for a price rule.

Required access

write_price_rules access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
code ( String! ) required

The new code of a price rule.

priceRuleId ( ID! ) required

The ID of the price rule object.

Return fields

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use priceRuleUserErrors instead

Version 2019-07 (Unsupported)

Update a discount code for a price rule.

Required access

write_price_rules access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
code ( String! ) required

The new code of a price rule.

priceRuleId ( ID! ) required

The ID of the price rule object.

Return fields

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use priceRuleUserErrors instead

Version 2019-04 (Unsupported)

Update a discount code for a price rule.

Required access

write_price_rules access scope.

Interactive example

This is an example mutation query. Use the embedded interactive tool below to edit the query.

Hint: use Ctrl + Space for autocompleting fields.


Arguments

Argument Description
code ( String! ) required

The new code of a price rule.

priceRuleId ( ID! ) required

The ID of the price rule object.

Return fields

Deprecated return fields

  • userErrors ([UserError!]!) deprecated

    List of errors that occurred executing the mutation.

    Deprecation warning

    Use priceRuleUserErrors instead