> ## Documentation Index
> Fetch the complete documentation index at: https://developer.fabric.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Update customer status

> With this endpoint, you can update the account status of an existing customer by `customerId`.



## OpenAPI

````yaml customers.openapi post /customers/{customerId}/actions/update-status
openapi: 3.0.0
info:
  title: Customers
  description: >-
    The fabric **Customers** API is used to create and manage details of
    storefront customers, also referred to as shoppers. The `Customers` or
    `Customer Address` APIs provide features for store admins to manage their
    customers' details and addresses. The `Customer Self' API provide features
    for customers or shoppers to independently manage their own details.
  version: 3.0.0
  x-audience: external-public
  contact:
    name: fabric Support
    email: support@fabric.inc
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
servers:
  - url: https://api.fabric.inc/v3
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Customer Profile
    description: >-
      These endpoints provide the features for store admins to create and manage
      customers' details.
  - name: Customer Address
    description: >-
      These endpoints provide the features for store admins to create and manage
      customers' addresses.
  - name: Customer Self
    description: >-
      These endpoints provide the feature for customers or shoppers to
      independently manage their details in the storefront.
paths:
  /customers/{customerId}/actions/update-status:
    parameters:
      - $ref: '#/components/parameters/xFabricTenantId'
      - $ref: '#/components/parameters/xFabricRequestId'
      - $ref: '#/components/parameters/customerIdPathParam'
    post:
      tags:
        - Customer Profile
      summary: Update customer status
      description: >-
        With this endpoint, you can update the account status of an existing
        customer by `customerId`.
      operationId: updateCustomerStatus
      requestBody:
        description: A sample request to update customer's account status.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateCustomerStatusRequest'
      responses:
        '200':
          $ref: '#/components/responses/customerStatusUpdateResponse'
        '400':
          $ref: '#/components/responses/badRequest'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/customerNotFound'
        '500':
          $ref: '#/components/responses/internalServerError'
components:
  parameters:
    xFabricTenantId:
      name: x-fabric-tenant-id
      in: header
      description: >-
        A header used by fabric to identify the tenant making the request. You
        must include tenant id in the authentication header for an API request
        to access any of fabric’s endpoints. You can retrieve the tenant id ,
        which is also called account id, from
        [Copilot](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
      schema:
        type: string
        example: 517fa9dfd42d8b00g1o3k312
    xFabricRequestId:
      name: x-fabric-request-id
      in: header
      description: A UUID of the request.
      schema:
        type: string
      example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
    customerIdPathParam:
      in: path
      name: customerId
      description: >-
        A 24-character system-generated ID of the customer. This is returned in
        the response of the `POST /customers` endpoint.
      required: true
      style: simple
      schema:
        type: string
        example: 61a558b1b155125f02be7fb1
  schemas:
    updateCustomerStatusRequest:
      type: object
      properties:
        status:
          description: The status of the customer's account.
          type: string
          enum:
            - ACTIVE
            - INACTIVE
            - BLOCKED
          example: ACTIVE
    customerStatusUpdate:
      description: The details of customer's status.
      type: object
      properties:
        type:
          description: A machine-readable code.
          type: string
          example: SUCCESS
        message:
          description: A human-readable message corresponding to `type`.
          type: string
          example: Success message
        status:
          type: string
          description: The customer's account status.
          enum:
            - ACTIVE
            - INACTIVE
            - BLOCKED
          example: ACTIVE
      required:
        - type
        - message
    message:
      description: The response message.
      type: object
      properties:
        type:
          description: A machine-readable code.
          type: string
          example: SUCCESS
        message:
          description: A human-friendly message corresponding to the `type`.
          type: string
          example: Success message
      required:
        - type
        - message
  responses:
    customerStatusUpdateResponse:
      description: Customer status update response
      headers:
        x-fabric-request-id:
          $ref: dae96e30-e72e-4091-be69-ce7f63e78aa2
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/customerStatusUpdate'
          examples:
            customerStatusUpdateSuccess:
              value:
                type: CUSTOMER_STATUS_UPDATE_SUCCESS
                message: Customer status updated successfully
                status: ACTIVE
            customerStatusAlreadyUpdated:
              value:
                type: CUSTOMER_STATUS_ALREADY_UPDATED
                message: Customer already has the target status
                status: ACTIVE
    badRequest:
      description: Bad request
      headers:
        x-fabric-request-id:
          $ref: dae96e30-e72e-4091-be69-ce7f63e78aa2
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/message'
          examples:
            invalidAccountProvided:
              value:
                type: INVALID_ACCOUNT_PROVIDED
                message: Invalid account provided for the request.
    forbidden:
      description: Forbidden Request
      headers:
        x-fabric-request-id:
          description: Unique request ID
          schema:
            type: string
            example: 263e731c-45c8-11ed-b878-0242ac120002
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/message'
          example:
            type: REQUEST_DENIED
            message: Forbidden
    customerNotFound:
      description: The resource isn't found
      headers:
        x-fabric-request-id:
          $ref: dae96e30-e72e-4091-be69-ce7f63e78aa2
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/message'
          example:
            type: CUSTOMER_NOT_FOUND
            message: Data with the given identifier isn't found
    internalServerError:
      description: The request is received but an internal error occurred
      headers:
        x-fabric-request-id:
          $ref: dae96e30-e72e-4091-be69-ce7f63e78aa2
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/message'
          example:
            type: INTERNAL_SERVER_ERROR
            message: Internal server error
  securitySchemes:
    bearerAuth:
      description: The access token.
      type: http
      scheme: bearer
      bearerFormat: JWT

````