Parties

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_balancecity

Combine any of these as query parameters. Also accepts cursor and page_size.

Fields on each result

id
integer
party_type
string
name
string
phone
string
email
string
cnic
string
city
string
current_balance
decimal
credit_limit
decimal
loyalty_points
integer
group
uuid
group_name
string
status
string
created_at
datetime
updated_at
datetime

Errors

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

party_typeOptional
enum(customer, supplier, both)* `customer` - Customer * `supplier` - Supplier * `both` - Both
nameRequired
string
phoneOptional
string
emailOptional
string
cnicOptional
string
ntnOptional
string
addressOptional
string
cityOptional
string
credit_limitOptional
decimal
wht_rateOptional
decimalWithholding-tax % to auto-apply on this party's sales (0 = off).
opening_balanceOptional
decimal
default_price_listOptional
integer
groupOptional
uuid
date_of_birthOptional
stringCustomer birthday — used for loyalty birthday bonus.
notesOptional
string
statusOptional
enum(active, inactive, blacklisted)* `active` - Active * `inactive` - Inactive * `blacklisted` - Blacklisted

Response fields

id
integer
party_type
enum(customer, supplier, both)* `customer` - Customer * `supplier` - Supplier * `both` - Both
name
string
phone
string
email
string
cnic
string
ntn
string
address
string
city
string
credit_limit
decimal
wht_rate
decimalWithholding-tax % to auto-apply on this party's sales (0 = off).
opening_balance
decimal
default_price_list
integer
group
uuid
date_of_birth
stringCustomer birthday — used for loyalty birthday bonus.
notes
string
status
enum(active, inactive, blacklisted)* `active` - Active * `inactive` - Inactive * `blacklisted` - Blacklisted

Errors

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

id
integer
party_type
string
name
string
phone
string
email
string
cnic
string
ntn
string
address
string
city
string
credit_limit
decimal
wht_rate
decimalWithholding-tax % to auto-apply on this party's sales (0 = off).
opening_balance
decimal
current_balance
decimal
default_price_list
integer
loyalty_points
integer
loyalty_tier
string
date_of_birth
stringCustomer birthday — used for loyalty birthday bonus.
notes
string
status
string
credit_limit_record
string
recent_ledger_entries
string
created_at
datetime
updated_at
datetime

Errors

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

party_typeOptional
enum(customer, supplier, both)* `customer` - Customer * `supplier` - Supplier * `both` - Both
nameOptional
string
phoneOptional
string
emailOptional
string
cnicOptional
string
ntnOptional
string
addressOptional
string
cityOptional
string
credit_limitOptional
decimal
wht_rateOptional
decimalWithholding-tax % to auto-apply on this party's sales (0 = off).
opening_balanceOptional
decimal
default_price_listOptional
integer
groupOptional
uuid
date_of_birthOptional
stringCustomer birthday — used for loyalty birthday bonus.
notesOptional
string
statusOptional
enum(active, inactive, blacklisted)* `active` - Active * `inactive` - Inactive * `blacklisted` - Blacklisted

Response fields

id
integer
party_type
enum(customer, supplier, both)* `customer` - Customer * `supplier` - Supplier * `both` - Both
name
string
phone
string
email
string
cnic
string
ntn
string
address
string
city
string
credit_limit
decimal
wht_rate
decimalWithholding-tax % to auto-apply on this party's sales (0 = off).
opening_balance
decimal
default_price_list
integer
group
uuid
date_of_birth
stringCustomer birthday — used for loyalty birthday bonus.
notes
string
status
enum(active, inactive, blacklisted)* `active` - Active * `inactive` - Inactive * `blacklisted` - Blacklisted

Errors

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."]
    }
  }
}