Skip to main content
POST
/
v2
/
vendor
Add a vendor
curl --request POST \
  --url https://app.getswipe.in/api/partner/v2/vendor \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "vendor_id": "123",
  "name": "TATA RATAN",
  "phone": "1234567890",
  "email": "[email protected]",
  "discount": 10,
  "gstin": "27AARCS7202C1ZD",
  "company_name": "GSTN",
  "opening_balance": "1245",
  "credit_limit": 200,
  "billing_address": {
    "state": "State Name",
    "country": "India",
    "addr_id": -1,
    "addr_id_v2": "addr1",
    "address_line1": "",
    "address_line2": "",
    "pincode": "500075",
    "city": ""
  },
  "opening_balance_type": 1,
  "dial_code": "91",
  "profile_image": "",
  "pan": "ABCD1234F",
  "notes": "Testing api",
  "cc_emails": "[email protected],[email protected]",
  "tags": [
    "<string>"
  ],
  "custom_fields": [
    {
      "label": "Custom Field 1",
      "value": "Value 1"
    }
  ],
  "visibility": 1
}
'
{
  "success": true,
  "message": "",
  "error_code": "",
  "errors": {},
  "data": {
    "message": "No data found!"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer , where is your auth token.

Body

application/json
vendor_id
string
required

Your Vendor ID

Example:

"123"

name
string
required

Vendor name

Example:

"TATA RATAN"

phone
string

Phone number

Example:

"1234567890"

email
string

Email address

discount
integer

Discount

Example:

10

gstin
string

GSTIN

Example:

"27AARCS7202C1ZD"

company_name
string

Company name

Example:

"GSTN"

opening_balance
string

Opening balance

Example:

"1245"

credit_limit
integer

Credit limit

Example:

200

billing_address
object
opening_balance_type
integer

Credit[0] / Debit[1]

Example:

1

dial_code
string

Dial code

Example:

"91"

profile_image
string

Profile image URL

Example:

""

pan
string

PAN

Example:

"ABCD1234F"

notes
string

Notes

Example:

"Testing api"

cc_emails
string

CC email addresses

tags
string[]

List of tags

custom_fields
object[]

Vendor Custom Fields. Custom fields should already be added in Swipe Portal.

Example:
[
{
"label": "Custom Field 1",
"value": "Value 1"
}
]
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.

Example:

1

Response

Success

success
boolean

Success flag

Example:

true

message
string

Response message

Example:

""

error_code
string

Error Code

Example:

""

errors
object

Errors

data
object