API Reference
Directory
Directory API endpoints
GET /directory
List directory entries
Authentication: Bearer token required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspace_id | string | Yes | Workspace ID to list entries for |
type | string | No | Filter by entry type |
status | string | No | Filter by status |
limit | integer | No | Number of entries to return (1-100, default 25) |
cursor | string | No | Pagination cursor from previous response |
Responses
200 — List of directory entries
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | Yes | |
data | array | Yes | |
cursor | string | No | |
has_more | boolean | Yes |
{
"ok": true,
"data": [
{
"id": "entry_abc123",
"type": "organization",
"label": "BDO Unibank",
"status": "active",
"fields": {
"name": "BDO Unibank",
"industry": "Finance"
}
}
],
"cursor": "eyJwb3Mi...",
"has_more": true
}Example
curl \
-H "Authorization: Bearer YOUR_TOKEN" \
https://api.nextpay.world/v1/directory?workspace_id=YOUR_WORKSPACE_IDPOST /directory
Create a directory entry
Authentication: Bearer token required
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
workspace_id | string | Yes | |
type | string | Yes | |
fields | object | Yes | |
name | string | No | |
tags | array | No | |
label | string | No |
Example Request
{
"workspace_id": "ws_abc123",
"type": "person",
"fields": {
"first-name": "Maria",
"last-name": "Santos",
"email": "maria.santos@bpi.com.ph",
"phone": "+63 917 123 4567"
},
"tags": [
"supplier",
"priority"
],
"label": "Maria Santos"
}Responses
200 — Created entry
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | Yes | |
data | object | Yes |
{
"ok": true,
"data": {
"id": "entry_def456"
}
}Example
curl -X POST \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"workspace_id":"ws_abc123","type":"person","fields":{"first-name":"Maria","last-name":"Santos","email":"maria.santos@bpi.com.ph","phone":"+63 917 123 4567"},"tags":["supplier","priority"],"label":"Maria Santos"}' \
https://api.nextpay.world/v1/directoryGET /directory/tags
List directory tags
Authentication: Bearer token required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspace_id | string | Yes | Workspace ID |
Responses
200 — List of tags
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | Yes | |
data | array | Yes |
{
"ok": true,
"data": [
{
"id": "tag_abc",
"name": "supplier",
"applies_to": "all"
},
{
"id": "tag_def",
"name": "priority",
"applies_to": "person"
}
]
}Example
curl \
-H "Authorization: Bearer YOUR_TOKEN" \
https://api.nextpay.world/v1/directory/tags?workspace_id=YOUR_WORKSPACE_IDGET /directory/{id}
Get a directory entry
Authentication: Bearer token required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Directory entry ID |
Responses
200 — Directory entry
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | Yes | |
data | object | Yes |
{
"ok": true,
"data": {
"id": "entry_abc123",
"type": "organization",
"label": "BDO Unibank",
"status": "active",
"fields": {
"name": "BDO Unibank",
"industry": "Finance",
"email": "corporate@bdo.com.ph"
},
"receiving_methods": [
{
"id": "rm_123",
"provider": "BDO",
"account_name": "BDO Unibank Inc.",
"account_id": "1234567890",
"is_default": true
}
]
}
}404 — Not found
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | Yes | |
error | object | Yes |
{
"ok": false,
"error": {
"code": "NOT_FOUND",
"message": "Entry not found"
}
}Example
curl \
-H "Authorization: Bearer YOUR_TOKEN" \
https://api.nextpay.world/v1/directory/YOUR_ENTRY_IDPATCH /directory/{id}
Update a directory entry
Authentication: Bearer token required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Directory entry ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
fields | object | No | |
name | string | No | |
tags | array | No | |
label | string | No | |
status | string | No |
Example Request
{
"fields": {
"email": "maria.santos@bpi.com.ph",
"phone": "+63 918 765 4321"
},
"status": "active"
}Responses
200 — Updated entry
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | Yes | |
data | object | Yes |
{
"ok": true,
"data": {
"id": "entry_def456"
}
}Example
curl -X PATCH \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"fields":{"email":"maria.santos@bpi.com.ph","phone":"+63 918 765 4321"},"status":"active"}' \
https://api.nextpay.world/v1/directory/YOUR_ENTRY_IDDELETE /directory/{id}
Delete a directory entry
Authentication: Bearer token required
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Directory entry ID |
Responses
200 — Deleted entry
| Field | Type | Required | Description |
|---|---|---|---|
ok | boolean | Yes | |
data | object | Yes |
{
"ok": true,
"data": {
"id": "entry_def456",
"deleted": true
}
}Example
curl -X DELETE \
-H "Authorization: Bearer YOUR_TOKEN" \
https://api.nextpay.world/v1/directory/YOUR_ENTRY_ID