curl --request POST \
--url https://app.getswipe.in/api/partner/v1/customer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "123",
"name": "TATA RATAN"
}
'import requests
url = "https://app.getswipe.in/api/partner/v1/customer"
payload = {
"customer_id": "123",
"name": "TATA RATAN"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({customer_id: '123', name: 'TATA RATAN'})
};
fetch('https://app.getswipe.in/api/partner/v1/customer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "Customer added successfully"
}{
"success": false,
"error_code": "INVALID_CUSTOMER_ID",
"message": "Error Message",
"errors": "List of errors"
}{
"success": false,
"error_code": "INVALID_CUSTOMER_ID",
"message": "Error Message",
"errors": "List of errors"
}Add a customer
v1 is deprecated — use the v2 endpoint instead. Creates a customer keyed by your own id. Sending an ID that already exists fails with CUSTOMER_ALREADY_EXISTS — use Update a customer to change an existing record. Customers are also created automatically when a document references an unknown party.id.
curl --request POST \
--url https://app.getswipe.in/api/partner/v1/customer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "123",
"name": "TATA RATAN"
}
'import requests
url = "https://app.getswipe.in/api/partner/v1/customer"
payload = {
"customer_id": "123",
"name": "TATA RATAN"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({customer_id: '123', name: 'TATA RATAN'})
};
fetch('https://app.getswipe.in/api/partner/v1/customer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"message": "Customer added successfully"
}{
"success": false,
"error_code": "INVALID_CUSTOMER_ID",
"message": "Error Message",
"errors": "List of errors"
}{
"success": false,
"error_code": "INVALID_CUSTOMER_ID",
"message": "Error Message",
"errors": "List of errors"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is an API key from the API Integration section of your dashboard. Keys are scoped to the company they are generated in — for testing, add a separate test company and generate the key there, so requests never touch your real books.
Body
Your Customer ID
"123"
Customer name
"TATA RATAN"
Phone number
1234567890
Email address
"reddi@reddi.reddi"
Discount
10
GSTIN
^(|[0-9A-Z]{15})$"27AARCS7202C1ZD"
Company name
"GSTN"
Opening balance
"1245"
Credit limit
200
List of billing addresses
Show child attributes
Show child attributes
List of shipping addresses
Show child attributes
Show child attributes
Credit[0] / Debit[1]
1
Dial code
"91"
Profile image URL
""
PAN
"ABCD1234F"
Notes
"Testing api"
CC email addresses
"reddi@reddi.reddi,acb.a@bcd.con"

