Customers & suppliers
One model for both. `party_type` decides which.
GET
/parties/parties/List customers or suppliers. They share one model; filter on `party_type` to pick.
Filters
include_internalparty_typestatussearchhas_balancecityCombine any of these as query parameters. Also accepts cursor and page_size.
Fields on each result
FieldType & description
idinteger
party_typestring
namestring
phonestring
emailstring
cnicstring
citystring
current_balancedecimal
credit_limitdecimal
loyalty_pointsinteger
groupuuid
group_namestring
statusstring
created_atdatetime
updated_atdatetime
Errors
CodeWhen it happens
401The access token is missing or has expired. Refresh and retry.403Your role lacks permission, or X-Shop-Id is a shop you cannot access.429Rate limited. Wait for Retry-After seconds.Request
curl https://api.tajirpoint.com/api/v1/parties/parties/ \
-H "Authorization: Bearer $TAJIR_TOKEN" \
-H "X-Shop-Id: 8f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f"Response · 200 · 1 more fields below
{
"next": "https://api.tajirpoint.com/api/v1/parties/parties/?cursor=cD0yMDI2LTA3LTExVDA5MTQyMlomcD00Mg",
"previous": null,
"results": [
{
"id": 42,
"party_type": "customer",
"name": "Nescafé Classic 200g",
"phone": "+923001234567",
"email": "shopkeeper@example.com",
"cnic": "cnic",
"city": "Lahore",
"current_balance": "1200.00",
"credit_limit": "0.00",
"loyalty_points": 1,
"group": "8f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f",
"group_name": "Main Store",
"status": "active",
"created_at": "2026-07-11T09:14:22Z"
}
]
}Response · error
{
"error": {
"code": 400,
"message": "Validation failed.",
"details": {
"quantity": ["Must be greater than zero."]
}
}
}POST
/parties/parties/Create a customer or a supplier.
Body parameters
FieldType & description
party_typeOptionalenum(customer, supplier, both)* `customer` - Customer
* `supplier` - Supplier
* `both` - Both
nameRequiredstring
phoneOptionalstring
emailOptionalstring
cnicOptionalstring
ntnOptionalstring
addressOptionalstring
cityOptionalstring
credit_limitOptionaldecimal
wht_rateOptionaldecimalWithholding-tax % to auto-apply on this party's sales (0 = off).
opening_balanceOptionaldecimal
default_price_listOptionalinteger
groupOptionaluuid
date_of_birthOptionalstringCustomer birthday — used for loyalty birthday bonus.
notesOptionalstring
statusOptionalenum(active, inactive, blacklisted)* `active` - Active
* `inactive` - Inactive
* `blacklisted` - Blacklisted
Response fields
FieldType & description
idinteger
party_typeenum(customer, supplier, both)* `customer` - Customer
* `supplier` - Supplier
* `both` - Both
namestring
phonestring
emailstring
cnicstring
ntnstring
addressstring
citystring
credit_limitdecimal
wht_ratedecimalWithholding-tax % to auto-apply on this party's sales (0 = off).
opening_balancedecimal
default_price_listinteger
groupuuid
date_of_birthstringCustomer birthday — used for loyalty birthday bonus.
notesstring
statusenum(active, inactive, blacklisted)* `active` - Active
* `inactive` - Inactive
* `blacklisted` - Blacklisted
Errors
CodeWhen it happens
400Validation failed. `details` names the offending fields.401The access token is missing or has expired. Refresh and retry.403Your role lacks permission, or X-Shop-Id is a shop you cannot access.429Rate limited. Wait for Retry-After seconds.Request
curl -X POST https://api.tajirpoint.com/api/v1/parties/parties/ \
-H "Authorization: Bearer $TAJIR_TOKEN" \
-H "X-Shop-Id: 8f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f" \
-H "Content-Type: application/json" \
-d '{
"name": "Nescafé Classic 200g",
"party_type": "customer",
"phone": "+923001234567",
"email": "shopkeeper@example.com",
"cnic": "cnic",
"ntn": "ntn",
"address": "12 Main Boulevard, Gulberg III",
"city": "Lahore",
"credit_limit": "0.00",
"wht_rate": "0.00"
}'Response · 200 · 3 more fields below
{
"id": 42,
"party_type": "customer",
"name": "Nescafé Classic 200g",
"phone": "+923001234567",
"email": "shopkeeper@example.com",
"cnic": "cnic",
"ntn": "ntn",
"address": "12 Main Boulevard, Gulberg III",
"city": "Lahore",
"credit_limit": "0.00",
"wht_rate": "0.00",
"opening_balance": "0.00",
"default_price_list": 1,
"group": "8f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f"
}Response · error
{
"error": {
"code": 400,
"message": "Validation failed.",
"details": {
"quantity": ["Must be greater than zero."]
}
}
}GET
/parties/parties/{id}/Retrieve one party with its current khata balance and credit limit.
Response fields
FieldType & description
idinteger
party_typestring
namestring
phonestring
emailstring
cnicstring
ntnstring
addressstring
citystring
credit_limitdecimal
wht_ratedecimalWithholding-tax % to auto-apply on this party's sales (0 = off).
opening_balancedecimal
current_balancedecimal
default_price_listinteger
loyalty_pointsinteger
loyalty_tierstring
date_of_birthstringCustomer birthday — used for loyalty birthday bonus.
notesstring
statusstring
credit_limit_recordstring
recent_ledger_entriesstring
created_atdatetime
updated_atdatetime
Errors
CodeWhen it happens
404No such record in this shop.401The access token is missing or has expired. Refresh and retry.403Your role lacks permission, or X-Shop-Id is a shop you cannot access.429Rate limited. Wait for Retry-After seconds.Request
curl https://api.tajirpoint.com/api/v1/parties/parties/42/ \
-H "Authorization: Bearer $TAJIR_TOKEN" \
-H "X-Shop-Id: 8f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f"Response · 200 · 9 more fields below
{
"id": 42,
"party_type": "customer",
"name": "Nescafé Classic 200g",
"phone": "+923001234567",
"email": "shopkeeper@example.com",
"cnic": "cnic",
"ntn": "ntn",
"address": "12 Main Boulevard, Gulberg III",
"city": "Lahore",
"credit_limit": "0.00",
"wht_rate": "0.00",
"opening_balance": "0.00",
"current_balance": "1200.00",
"default_price_list": 1
}Response · error
{
"error": {
"code": 400,
"message": "Validation failed.",
"details": {
"quantity": ["Must be greater than zero."]
}
}
}PATCH
/parties/parties/{id}/Update a party.
Body parameters
FieldType & description
party_typeOptionalenum(customer, supplier, both)* `customer` - Customer
* `supplier` - Supplier
* `both` - Both
nameOptionalstring
phoneOptionalstring
emailOptionalstring
cnicOptionalstring
ntnOptionalstring
addressOptionalstring
cityOptionalstring
credit_limitOptionaldecimal
wht_rateOptionaldecimalWithholding-tax % to auto-apply on this party's sales (0 = off).
opening_balanceOptionaldecimal
default_price_listOptionalinteger
groupOptionaluuid
date_of_birthOptionalstringCustomer birthday — used for loyalty birthday bonus.
notesOptionalstring
statusOptionalenum(active, inactive, blacklisted)* `active` - Active
* `inactive` - Inactive
* `blacklisted` - Blacklisted
Response fields
FieldType & description
idinteger
party_typeenum(customer, supplier, both)* `customer` - Customer
* `supplier` - Supplier
* `both` - Both
namestring
phonestring
emailstring
cnicstring
ntnstring
addressstring
citystring
credit_limitdecimal
wht_ratedecimalWithholding-tax % to auto-apply on this party's sales (0 = off).
opening_balancedecimal
default_price_listinteger
groupuuid
date_of_birthstringCustomer birthday — used for loyalty birthday bonus.
notesstring
statusenum(active, inactive, blacklisted)* `active` - Active
* `inactive` - Inactive
* `blacklisted` - Blacklisted
Errors
CodeWhen it happens
400Validation failed. `details` names the offending fields.401The access token is missing or has expired. Refresh and retry.403Your role lacks permission, or X-Shop-Id is a shop you cannot access.429Rate limited. Wait for Retry-After seconds.Request
curl -X PATCH https://api.tajirpoint.com/api/v1/parties/parties/42/ \
-H "Authorization: Bearer $TAJIR_TOKEN" \
-H "X-Shop-Id: 8f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f" \
-H "Content-Type: application/json" \
-d '{
"party_type": "customer",
"name": "Nescafé Classic 200g",
"phone": "+923001234567",
"email": "shopkeeper@example.com",
"cnic": "cnic",
"ntn": "ntn",
"address": "12 Main Boulevard, Gulberg III",
"city": "Lahore",
"credit_limit": "0.00",
"wht_rate": "0.00"
}'Response · 200 · 3 more fields below
{
"id": 42,
"party_type": "customer",
"name": "Nescafé Classic 200g",
"phone": "+923001234567",
"email": "shopkeeper@example.com",
"cnic": "cnic",
"ntn": "ntn",
"address": "12 Main Boulevard, Gulberg III",
"city": "Lahore",
"credit_limit": "0.00",
"wht_rate": "0.00",
"opening_balance": "0.00",
"default_price_list": 1,
"group": "8f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f"
}Response · error
{
"error": {
"code": 400,
"message": "Validation failed.",
"details": {
"quantity": ["Must be greater than zero."]
}
}
}