Customer Contacts

Named contacts on a customer record (e.g. for the customer portal). Uses the customers.* scope.

GET/api/v1/customer-contacts

List customer contacts

Scope: customers.read

Parameters

NameInTypeRequiredDescription
pagequerynumberOptional1-based page number.
limitquerynumberOptionalPage size, max 200.
qquerystringOptionalFree-text search.
customerIdquerystringOptionalFilter to one customer's contacts.

Example request

curl "https://invoice.avscorp.in/api/v1/customer-contacts" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

JSON
{
  "id": "clx6cnt00000000000000001",
  "organizationId": "clx0org000000000000000001",
  "customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
  "name": "Priya Sharma",
  "email": "priya.sharma@example.com",
  "phone": "+919876543210",
  "roleLabel": "Accounts Payable",
  "isPrimary": false,
  "enabled": true,
  "invitedAt": null,
  "lastLoginAt": null,
  "createdAt": "2026-02-15T05:45:00.000Z",
  "updatedAt": "2026-02-15T05:45:00.000Z"
}

Possible errors: unauthorized, insufficient_scope, forbidden

POST/api/v1/customer-contacts

Create a customer contact

Scope: customers.update

Request body

FieldTypeRequiredConstraints
customerIdstringRequiredmin length 1
namestringRequiredmin length 1; max length 120
emailanyRequired—
phoneanyRequired—
roleLabelanyRequired—

Example request

curl -X POST "https://invoice.avscorp.in/api/v1/customer-contacts" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
  "name": "Priya Sharma",
  "email": "priya.sharma@example.com",
  "phone": null,
  "roleLabel": null
}'

Example response

JSON
{
  "id": "clx6cnt00000000000000001",
  "organizationId": "clx0org000000000000000001",
  "customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
  "name": "Priya Sharma",
  "email": "priya.sharma@example.com",
  "phone": "+919876543210",
  "roleLabel": "Accounts Payable",
  "isPrimary": false,
  "enabled": true,
  "invitedAt": null,
  "lastLoginAt": null,
  "createdAt": "2026-02-15T05:45:00.000Z",
  "updatedAt": "2026-02-15T05:45:00.000Z"
}

Possible errors: unauthorized, insufficient_scope, forbidden, validation_error, not_found

GET/api/v1/customer-contacts/{id}

Get a customer contact

Scope: customers.read

Parameters

NameInTypeRequiredDescription
idpathstringRequiredContact ID.

Example request

curl "https://invoice.avscorp.in/api/v1/customer-contacts/clx6cnt00000000000000001" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

JSON
{
  "id": "clx6cnt00000000000000001",
  "organizationId": "clx0org000000000000000001",
  "customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
  "name": "Priya Sharma",
  "email": "priya.sharma@example.com",
  "phone": "+919876543210",
  "roleLabel": "Accounts Payable",
  "isPrimary": false,
  "enabled": true,
  "invitedAt": null,
  "lastLoginAt": null,
  "createdAt": "2026-02-15T05:45:00.000Z",
  "updatedAt": "2026-02-15T05:45:00.000Z"
}

Possible errors: unauthorized, insufficient_scope, forbidden, not_found

PATCH/api/v1/customer-contacts/{id}

Update a customer contact

Scope: customers.update

Parameters

NameInTypeRequiredDescription
idpathstringRequiredContact ID.

Request body

FieldTypeRequiredConstraints
namestringOptionalmin length 1; max length 120
emailanyOptional—
phoneanyOptional—
roleLabelanyOptional—

Example request

curl -X PATCH "https://invoice.avscorp.in/api/v1/customer-contacts/clx6cnt00000000000000001" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "roleLabel": "Accounts Payable"
}'

Example response

JSON
{
  "id": "clx6cnt00000000000000001",
  "organizationId": "clx0org000000000000000001",
  "customerId": "clx1a2b3c4d5e6f7g8h9i0j1",
  "name": "Priya Sharma",
  "email": "priya.sharma@example.com",
  "phone": "+919876543210",
  "roleLabel": "Accounts Payable",
  "isPrimary": false,
  "enabled": true,
  "invitedAt": null,
  "lastLoginAt": null,
  "createdAt": "2026-02-15T05:45:00.000Z",
  "updatedAt": "2026-02-15T05:45:00.000Z"
}

Possible errors: unauthorized, insufficient_scope, forbidden, not_found, validation_error

DELETE/api/v1/customer-contacts/{id}

Disable a customer contact

Scope: customers.update

This is a soft-disable (enabled set to false), not a hard delete — the contact record is retained.

Parameters

NameInTypeRequiredDescription
idpathstringRequiredContact ID.

Example request

curl -X DELETE "https://invoice.avscorp.in/api/v1/customer-contacts/clx6cnt00000000000000001" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

JSON
{
  "deleted": true
}

Possible errors: unauthorized, insufficient_scope, forbidden, not_found