---
title: "Add a vendor"
method: POST
path: "/v2/vendor"
tags: ["Vendor V2"]
---

# Add a vendor

`POST /v2/vendor`

## Request body

- BaseVendorV2
  - `vendor_id` string, required — Your Vendor ID
  - `name` string, required — Vendor name
  - `phone` string — Phone number
  - `email` string — Email address
  - `discount` integer — Discount
  - `gstin` string — GSTIN
  - `company_name` string — Company name
  - `opening_balance` string — Opening balance
  - `credit_limit` integer — Credit limit
  - `billing_address` AddressV2
    - `addr_id` integer — Address ID. It will automatically update the existing address if the address ID already exists.
    - `addr_id_v2` string — Address ID. It must be alphanumeric, not empty, and up to 16 characters long.
    - `address_line1` string — Address line 1
    - `address_line2` string — Address line 2
    - `pincode` string — Pincode
    - `city` string — City
    - `state` 'JAMMU AND KASHMIR' | 'HIMACHAL PRADESH' | 'PUNJAB' | 'CHANDIGARH' | 'UTTARAKHAND' | 'HARYANA' | 'DELHI' | 'RAJASTHAN' | 'UTTAR PRADESH' | 'BIHAR' | 'SIKKIM' | 'ARUNACHAL PRADESH' | 'NAGALAND' | 'MANIPUR' | 'MIZORAM' | 'TRIPURA' | 'MEGHALAYA' | 'ASSAM' | 'WEST BENGAL' | 'JHARKHAND' | 'ODISHA' | 'CHHATTISGARH' | 'MADHYA PRADESH' | 'GUJARAT' | 'DADRA & NAGAR HAVELI & DAMAN & DIU' | 'MAHARASHTRA' | 'ANDHRAPRADESH(BEFOREADDED)' | 'KARNATAKA' | 'GOA' | 'LAKSHWADEEP' | 'KERALA' | 'TAMIL NADU' | 'PUDUCHERRY' | 'ANDAMAN & NICOBAR' | 'TELANGANA' | 'ANDHRA PRADESH' | 'LADAKH(NEWLYADDED)' | 'OTHER TERRITORY', required — State. You can copy the state details from https://developers.getswipe.in/api-reference/references#state-details
    - `country` 'Afghanistan' | 'Albania' | 'Algeria' | 'Andorra' | 'Angola' | 'Antigua and Barbuda' | 'Argentina' | 'Armenia' | 'Australia' | 'Austria' | 'Azerbaijan' | 'Bahamas' | 'Bahrain' | 'Bangladesh' | 'Barbados' | 'Belarus' | 'Belgium' | 'Belize' | 'Benin' | 'Bhutan' | 'Bolivia' | 'Bosnia and Herzegovina' | 'Botswana' | 'Brazil' | 'Brunei' | 'Bulgaria' | 'Burkina Faso' | 'Burundi' | 'Cabo Verde' | 'Cambodia' | 'Cameroon' | 'Canada' | 'Central African Republic' | 'Chad' | 'Chile' | 'China' | 'Colombia' | 'Comoros' | 'Congo, Democratic Republic of the' | 'Congo, Republic of the' | 'Costa Rica' | 'Croatia' | 'Cuba' | 'Cyprus' | 'Czechia' | 'Denmark' | 'Djibouti' | 'Dominica' | 'Dominican Republic' | 'Ecuador' | 'Egypt' | 'El Salvador' | 'Equatorial Guinea' | 'Eritrea' | 'Estonia' | 'Eswatini' | 'Ethiopia' | 'Fiji' | 'Finland' | 'France' | 'Gabon' | 'Gambia' | 'Georgia' | 'Germany' | 'Ghana' | 'Greece' | 'Grenada' | 'Guatemala' | 'Guinea' | 'Guinea-Bissau' | 'Guyana' | 'Haiti' | 'Honduras' | 'Hungary' | 'Iceland' | 'India' | 'Indonesia' | 'Iran' | 'Iraq' | 'Ireland' | 'Israel' | 'Italy' | 'Jamaica' | 'Japan' | 'Jordan' | 'Kazakhstan' | 'Kenya' | 'Kiribati' | 'Korea, North' | 'Korea, South' | 'Kosovo' | 'Kuwait' | 'Kyrgyzstan' | 'Laos' | 'Latvia' | 'Lebanon' | 'Lesotho' | 'Liberia' | 'Libya' | 'Liechtenstein' | 'Lithuania' | 'Luxembourg' | 'Madagascar' | 'Malawi' | 'Malaysia' | 'Maldives' | 'Mali' | 'Malta' | 'Marshall Islands' | 'Mauritania' | 'Mauritius' | 'Mexico' | 'Micronesia' | 'Moldova' | 'Monaco' | 'Mongolia' | 'Montenegro' | 'Morocco' | 'Mozambique' | 'Myanmar' | 'Namibia' | 'Nauru' | 'Nepal' | 'Netherlands' | 'New Zealand' | 'Nicaragua' | 'Niger' | 'Nigeria' | 'North Macedonia' | 'Norway' | 'Oman' | 'Pakistan' | 'Palau' | 'Palestine' | 'Panama' | 'Papua New Guinea' | 'Paraguay' | 'Peru' | 'Philippines' | 'Poland' | 'Portugal' | 'Qatar' | 'Romania' | 'Russia' | 'Rwanda' | 'Saint Kitts and Nevis' | 'Saint Lucia' | 'Saint Vincent and the Grenadines' | 'Samoa' | 'San Marino' | 'Sao Tome and Principe' | 'Saudi Arabia' | 'Senegal' | 'Serbia' | 'Seychelles' | 'Sierra Leone' | 'Singapore' | 'Slovakia' | 'Slovenia' | 'Solomon Islands' | 'Somalia' | 'South Africa' | 'South Sudan' | 'Spain' | 'Sri Lanka' | 'Sudan' | 'Suriname' | 'Sweden' | 'Switzerland' | 'Syria' | 'Taiwan' | 'Tajikistan' | 'Tanzania' | 'Thailand' | 'Timor-Leste' | 'Togo' | 'Tonga' | 'Trinidad and Tobago' | 'Tunisia' | 'Turkey' | 'Turkmenistan' | 'Tuvalu' | 'Uganda' | 'Ukraine' | 'United Arab Emirates' | 'United Kingdom' | 'United States' | 'Uruguay' | 'Uzbekistan' | 'Vanuatu' | 'Vatican City' | 'Venezuela' | 'Vietnam' | 'Yemen' | 'Zambia' | 'Zimbabwe', required — Country. You can copy the country details from https://developers.getswipe.in/api-reference/references#country-array
  - `opening_balance_type` integer — Credit[0] / Debit[1]
  - `dial_code` string — Dial code
  - `profile_image` string — Profile image URL
  - `pan` string — PAN
  - `notes` string — Notes
  - `cc_emails` string — CC email addresses
  - `tags` string[] — List of tags
  - `custom_fields` VendorCustomFields[] — Vendor Custom Fields. Custom fields should already be added in Swipe Portal.
    - `label` string, required
    - `value` string, required
  - `visibility` integer — If set to 1, the vendor will be visible to all branches. If set to 0, the vendor will be visible only to the branch it was created in.

## Response `201`

Success

- VendorResponseV2
  - `success` boolean — Success flag
  - `message` string — Response message
  - `error_code` string — Error Code
  - `errors` object — Errors
  - `data` EmptyData
    - `message` string — Response message

## Other responses

- `400` — Validation Error
- `401` — Unauthorized

---

[API](https://skmtc.dev/getswipe/apis/swipeapi.md) · [All operations](https://skmtc.dev/getswipe/apis/swipeapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getswipe/swipeapi/revisions/80fcaf1a3463/schema)
