OnPrintShop icon

OnPrintShop

Interact with OnPrintShop API

Actions218

Customer → Update

AI-generated

Summary

Updates a customer record via GraphQL mutation using provided fields and customer ID.

Inputs

  • customer_id (required) — Customer ID for update (required for update operation). Type: number, default: 0.
  • safeMode — If enabled, retries first page without nested groups when server returns 5xx. Type: boolean, default: false.
  • updateFields — Fields to update. Type: collection, placeholder: Add Field, default: {}. Contains optional fields with their own types and defaults.

Output shape

The API response from the GraphQL mutation; exact shape not explicitly declared in properties or source.

The operation builds a GraphQL mutation with only the provided fields and the customer ID, sends the request, and handles the response. All field options (registration_type, corporateid, departmentid, first_name, last_name, email, password, set_password, phone_no, company_name, user_group, secondary_emails, status, tax_exemption, payon_account, payon_limit) are sourced directly from the node's description.properties.

Examples

Example 1: Update customer email and status

Set customer_id to the target customer's ID, enable safeMode if desired, and add email and status to updateFields.

Discussion