Update a brand profile (same as PUT)
AI agents: read /llms.txt; add .md to any page URL. This page as Markdown: /reference/customer-brand-profiles/v1-customer-profile-update-patch.md. Index of every page and the rules for every call: /llms.txt. Guides and concepts in one file: /llms-full.txt. OpenAPI: /openapi.json.
PATCH/
Changes the fields you send and returns the profile. Documents that use the profile show the change. The profile's Ship From address is checked on every update, whether you send address_id or not: if it is no longer current, or the profile has none, send a current one.
PUT and PATCH check the same fields.
Business rules
- After a customer address used here is edited, it is replaced by a new address (see Update a customer address) and this check refuses the old one with 409. Send the new
address_id. - Customers synced from Shopify are read-only here: changes are refused with 422
validation_error"External customers are read-only. Manage changes from Shopify." System customers (is_system: true) are refused the same way ("System customer cannot be modified or deleted.").
Path parameters
Your team slug, shown as Team ID next to your API key in Profile.
- Example
your-team
- Example
The customer's id (
idfrom List customers or Create a customer). A hash id from an earlier answer; unique keys and document numbers (such asPO0042) don't work here.- Example
EDhVUaC6jbLbed
- Example
The brand profile's id (
idfrom List a customer's brand profiles). A hash id from an earlier answer; unique keys and document numbers (such asPO0042) don't work here.- Example
uAu3dAKIaHyAYk
- Example
Request body
application/json, required.
address_idstringA new Ship From address. Same rules as on create.
company_namestringemailstringThe brand profile's email address, printed on documents.
media_idstringRequired when
use_custom_logois true. An uploaded file not attached to anything yet; an attached one is silently not used.phonestringThe brand profile's phone number, printed on documents.
use_custom_logobooleanwebsitestringThe website address.
Response
200Successful response.
Child fields (12)
The Ship From address, or null for a profile that has none.
New sales orders and quotes for the customer use the primary profile.
addressobject | nullThe Ship From address (an address, as in Customer addresses, without
used_by_active_profile), or null.Child fields (33)
False for deleted, replaced, Shopify or redacted addresses. Only current addresses can be picked for new documents or edited.
Goes up by one on every saved change. Send it back as
base_revision_numberwhen updating the address to protect against concurrent edits.billingorshippingfor customer addresses.address2string | nulladdress_family_idstring | nullShared by an address and the copies made when it was edited after use.
citystring | nullcopied_from_address_idstring | nullcountrystring | nullcountry_codestring | nullcustomer_idstringCustomer addresses only: the customer's id.
external_typestring | nullshopifyfor an address synced from Shopify.hold_stockbooleanCompany locations only; false for customer addresses.
is_default_warehousebooleanCompany locations only; false for customer addresses.
is_externalbooleanTrue for an address synced from Shopify; such addresses are read-only.
nexusbooleanCompany locations only; false for customer addresses.
notestring | nullowner_idstring | nullThe owner's id: for a customer address, the customer's id (the same as
customer_id).owner_typestringcustomerfor customer addresses.- One of:
"customer","team","unknown"
- One of:
postal_can_validatebooleanpostal_is_validbooleanpostal_validatedbooleanTrue once YoPrint has checked the address with its address validator.
postal_can_validatesays whether it could be checked andpostal_is_validgives the result. Any edit resets it to false.postcodestring | nullsourcestringcustomerfor customer addresses.- One of:
"customer","company_location","custom","unknown"
- One of:
statestring | nullstate_codestring | nullsuperseded_atstring (date-time) | nullsuperseded_by_address_idstring | nullSet on an old copy: the address that replaced it.
used_by_active_profilebooleanTrue when a brand profile uses it as Ship From. Sent on lists, reads, updates and customer answers; not on create or set-primary.
emailstring | nulllogoobject | nullThe newest logo file (a file, as in Customer files), or null.
Child fields (18)
Customer files:
tax_exemption,internal_fileorexternal_file. Vendor files:default,mockuporproduction_file.The display name.
Bytes.
custom_propertiesobject | arraycustomer_idstringCustomer files only.
dimensionsobject | nullPixel size of an image, read from its header; null for other files and for images uploaded before the size was recorded.
is_imagebooleanpositioninteger | nullWhere the file sorts.
previewobject | nullPreview image links
small,mediumandlarge(250, 800 and 1200 px), or null when there is no preview.preview_statestringready: the preview links work.processing: an image over 10 MB whose stored preview a worker is still making (seconds); read the file again, or in the web app wait formedia.preview_state_changedon the team channel.too_large: an image over 120 megapixels; it never gets a preview.failed: the worker gave up.none: not an image.- One of:
"ready","processing","too_large","failed","none"
- One of:
show_in_pdfboolean | nullsource_media_idstring | nullurlstring | nullWhere to download the file.
view_urlstring | nullA signed link to view the file. It expires: read it fresh, and don't store it.
phonestring | nullwebsitestring | null
Errors
401The API key is missing or wrong (
unauthenticated).403You are not allowed to do this.
api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only{"message": "Insufficient Permission"}. Other refusals use the error envelope, withunauthorizedoruser_is_not_authorized.- When
- Your role has no Manage Customers permission. This 403 has a short body,
{"message": "Insufficient Permission"}, with nosuccessorerror. - Fix
- Ask a team owner to give your role Manage Customers.
404Not found.
page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's.code: null, with a message that starts "No query results for": there is no record with that id.- When
- No live brand profile with this id on the customer, or no customer with this id.
error.codeis null anderror.messagenames the record type. - Fix
- Check the ids.
409The Ship From address is an old copy replaced by an edit (
blocked_superseded_historical_address;current_addressis the copy to use), or it is deleted, synced or redacted (blocked_external_or_compliance;current_addressis the same address, or null when the profile has none). Not the usual error envelope:success: false,address_save_resultandmessage(thesave_mode); nostatusorerror.- When
- The Ship From address, sent or saved, is deleted, replaced, synced or redacted, or the profile has none and you sent no
address_id(blocked_external_or_compliancewithcurrent_address: null). Not the usual error envelope:success: false,address_save_result,message. - Fix
- Send
address_idwith a current address.
422Validation failed, or the image was refused by the media rules: a mockup that is not an image a preview can be made of (
mockup_type_not_allowed), or an image over a size limit (image_not_allowed), or a file that is a web page, a script or a program (validation_failedonmedia, orupload_not_allowed: "This type of file cannot be uploaded.");error.messageis one sentence naming the limit.- When
- The address is not this customer's billing address or a company location (
error.codeinvalid_profile_address). - Fix
- Pick a valid Ship From address.
- When
- A field has the wrong type,
media_idis missing whileuse_custom_logois true, or an id is not the team's.error.codeisvalidation_failed. - Fix
- Fix each field named in
error.fields; its keys are field paths such ascontact.0.phone. - When
- The customer comes from Shopify, or is a system customer (
error.codevalidation_error, with the reason inerror.message). - Fix
- Change Shopify customers in Shopify. System customers cannot be changed.
Notes
- A new logo (
media_id) is added to the profile's files; the newest one is thelogo.
Related
- PUTUpdate a customer address
/v1/ api/ store/ {team_slug}/ customer/ {hash_id}/ address/ {id}
