Customer V2

Update a customer

Changed on

Updates an existing customer's details. Changes propagate to the documents linked to this customer.

put/v2/customer

Request

  • Base URL
    https://app.getswipe.in/api/partner
  • URL
    https://app.getswipe.in/api/partner/v2/customer
  • Auth
    HTTP bearer

Request body

customer_idstring required

Your Customer ID

namestring required

Customer name

phonestring

Phone number

emailstring

Email address

cc_emailsstring

CC email addresses, comma-separated

discountinteger

Discount

gstinstring

GSTIN

company_namestring

Company name

opening_balancestring

Opening balance

credit_limitinteger

Credit limit

opening_balance_typeinteger

Credit[0] / Debit[1]

dial_codestring

Dial code

profile_imagestring

Profile image URL

panstring

PAN

notesstring

Notes

tagsstring[]

List of tags

visibilityinteger

Customer visibility status: If the value is 1, the customer will be visible to all branches; otherwise, it will only be visible in the main branch.

swipe_idstring

Swipe ID assigned to the customer

Example request

{
  "customer_id": "123",
  "name": "TATA RATAN",
  "email": "reddi@reddi.reddi",
  "cc_emails": "a@example.com,b@example.com",
  "discount": 10,
  "gstin": "27AARCS7202C1ZD",
  "company_name": "GSTN",
  "opening_balance": "1245",
  "credit_limit": 200,
  "billing_address": [
    {
      "addr_id": 1,
      "addr_id_v2": "addr1",
      "pincode": "500075",
      "state": "State Name",
      "country": "India"
    }
  ],
  "shipping_address": [
    {
      "addr_id": 1,
      "addr_id_v2": "addr1",
      "pincode": "500075",
      "state": "State Name",
      "country": "India"
    }
  ],
  "opening_balance_type": 1,
  "dial_code": "91",
  "pan": "ABCD1234F",
  "notes": "Testing api",
  "custom_fields": [
    {
      "label": "Custom Field 1",
      "value": "Value 1"
    }
  ],
  "visibility": 1
}

Response

Success

successboolean

Success flag

messagestring

Response message

error_codestring

Error Code

errorsobject

Errors

Example response

{
  "success": true,
  "data": {
    "message": "No data found!"
  }
}

Changes

    • breaking

      removed the enum value Korea North of the request property //

    • breaking

      removed the enum value Korea North of the request property //

    • breaking

      removed the enum value Korea South of the request property //

    • breaking

      removed the enum value Korea South of the request property //

    • info

      api operation id v2_put_customer removed and replaced with put_customer

    • info

      added the new optional request property

    • info

      added the new LADAKH(NEWLY ADDED) enum value to the request property //

    • info

      added the new LADAKH(NEWLY ADDED) enum value to the request property //

    • info

      added the new Republic of Korea (South Korea) enum value to the request property //

    • info

      added the new Republic of Korea (South Korea) enum value to the request property //

    • info

      removed the pattern ^(|[0-9A-Z]{15})$ from the request property

    • info

      removed the pattern ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+(\.[a-zA-Z]{2,5})+$ from the request property