Skip to content

Get Customer Profile

Retrieve the authenticated customer's profile information.

Endpoint

GET /api/shop/customer-profile

Request Headers

HeaderRequiredDescription
X-STOREFRONT-KEYYesYour storefront API key
AuthorizationYesBearer token (customer login required)

Response

The response is an array holding exactly one object — the authenticated customer. There is no customer wrapper key; read [0].

FieldTypeDescription
idstringCustomer ID, returned as a string on this endpoint.
firstName / lastNamestringName on the account.
emailstringEmail address, also the login identifier.
phonestringPhone number, null until one is saved.
genderstringMale, Female, or Other. Absent from the payload until first set.
dateOfBirthstringBirth date as YYYY-MM-DD. Absent until first set.
statusstring"1" while the account is active.
subscribedToNewsLetterbooleanNewsletter subscription state.
isVerifiedstring"1" once the email has been verified, "0" otherwise.
isSuspendedstring"1" when an admin has suspended the account.
imagestringProfile image path, null when none is set.
password / confirmPasswordstringAlways null — they exist because the same shape backs the update endpoint, and the stored hash is never returned.
success / messagestringAlways null on a read; they carry values only on Update Profile.

Note the flags differ by endpoint: this read returns isVerified and isSuspended as "0" / "1", while the update response returns them as "false" / "true".

Use Cases

  • Account dashboard — one call returns everything the account screen shows, so no per-field lookups are needed.
  • Pre-fill the edit form — read here, submit the changed subset to Update Profile; the update is a partial patch.
  • Session-state check on load401 means the stored token is dead; a 200 doubles as confirmation the session is live.

Best Practices

  • Unwrap the array first — the payload is [{…}], not {…}, and a client that reads it as an object gets undefined everywhere.
  • Do not treat missing gender or dateOfBirth as an error — the keys are simply absent until the customer sets them.
  • Ignore password, confirmPassword, success, and message here — they are structural placeholders on the read path.

Released under the MIT License.