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

# Update customer mapping



## OpenAPI

````yaml post /v2/customer/list
openapi: 3.0.1
info:
  title: SwipeAPI
  description: Partner API
  version: '2.0'
servers:
  - url: https://app.getswipe.in/api/partner
security:
  - bearerAuth: []
tags:
  - name: Document
    description: Document related operations
  - name: Customer
    description: Customer related operations
  - name: Payment
    description: Payment related operations
  - name: Product
    description: Product related operations
  - name: Utility
    description: Generic operations
  - name: Subscriptions
    description: Subscriptions related operations
  - name: Document V2
    description: Document related operations
  - name: Customer V2
    description: Customer related operations
  - name: Payment V2
    description: Payment related operations
  - name: Product V2
    description: Product related operations
  - name: Subscriptions V2
    description: Subscriptions related operations
  - name: Utility V2
    description: Generic operations
  - name: Vendor V2
    description: Vendor related operations
  - name: EwayBill
    description: EwayBill related operations
  - name: Inventory V2
    description: Inventory related operations
paths:
  /v2/customer/list:
    post:
      tags:
        - Customer V2
      summary: Update customer mapping
      operationId: v2_post_customer_list
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListCustomerMapModel'
        required: true
      responses:
        '200':
          description: Updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerResponseV2'
        '400':
          description: Error in mapping Customer List
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerResponseV2'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerResponseV2'
        '409':
          description: Error in mapping Customer List
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerMappingResponseV2'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerResponseV2'
components:
  schemas:
    ListCustomerMapModel:
      required:
        - customer_mapping
      type: object
      properties:
        customer_mapping:
          type: array
          items:
            $ref: '#/components/schemas/CustomerMapModel'
    CustomerResponseV2:
      type: object
      properties:
        success:
          type: boolean
          description: Success flag
          example: true
        message:
          type: string
          description: Response message
          example: ''
        error_code:
          type: string
          description: Error Code
          example: ''
        errors:
          type: object
          properties: {}
          description: Errors
        data:
          $ref: '#/components/schemas/EmptyData'
    CustomerMappingResponseV2:
      type: object
      properties:
        success:
          type: boolean
          description: Success flag
          example: true
        message:
          type: string
          description: Response message
          example: Message
        error_code:
          type: string
          description: Error Code
          example: ''
        errors:
          type: object
          properties: {}
          description: Errors
        data:
          type: object
          properties: {}
          description: Data
    CustomerMapModel:
      required:
        - customer_id
        - swipe_id
      type: object
      properties:
        customer_id:
          type: string
          description: Customer ID
        swipe_id:
          type: string
          description: Swipe ID
          example: '1'
        force_update:
          type: boolean
          description: >-
            Updates even if the customer id is already mapped with other swipe
            id, no customer details will be updated
          example: true
    EmptyData:
      type: object
      properties:
        message:
          type: string
          description: Response message
          example: No data found!
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form Bearer <token>, where <token>
        is your auth token.

````