Skip to content

Commit 2681e0f

Browse files
committed
Fix API endpoint paths and remove misplaced examples
- Fix Field Value Changes endpoint: /field-values-changes → /field-value-changes (3 occurrences) - Remove stray organizations/fields curl example from Fields section (belongs in Organizations) - Remove dangling GET /lists/{list_id} line from Fields section - Fix Entity Files 'Get a Specific File' section: remove misplaced webhook examples All changes verified against live browser documentation.
1 parent f7fa85d commit 2681e0f

1 file changed

Lines changed: 17 additions & 70 deletions

File tree

docs/v1/affinity_api_docs.md

Lines changed: 17 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,10 @@ GET /fields Response:
467467
]
468468
```
469469

470-
3. Query [`GET /field-values-changes`](#field-value-change) passing in the `id` from Step 2
470+
3. Query [`GET /field-value-changes`](#field-value-change) passing in the `id` from Step 2
471471

472472
```
473-
GET /field-values-changes Response:
473+
GET /field-value-changes Response:
474474
[
475475
{
476476
"id": 7,
@@ -513,10 +513,10 @@ GET /field-values-changes Response:
513513
]
514514
```
515515

516-
4. Filter results of [`GET /field-values-changes`](#field-value-change) (e.g.: If you only want status field changes for a specific organization in your list, search by the `list_entry_id`).
516+
4. Filter results of [`GET /field-value-changes`](#field-value-change) (e.g.: If you only want status field changes for a specific organization in your list, search by the `list_entry_id`).
517517

518518
```
519-
GET /field-values-changes Response:
519+
GET /field-value-changes Response:
520520
[
521521
{
522522
"id": 7,
@@ -1279,19 +1279,9 @@ curl -X POST "https://api.affinity.co/fields" \
12791279
}
12801280
```
12811281

1282-
```bash
1283-
curl "https://api.affinity.co/organizations/fields" -u :$APIKEY
1284-
```
1285-
1286-
#### Example Response
1287-
1288-
```json
1289-
{
1290-
"id": 123
1291-
}
1292-
```
1282+
---
12931283

1294-
`GET /lists/{list_id}`
1284+
# Fields
12951285

12961286
#### The Field Resource
12971287

@@ -1955,7 +1945,7 @@ The action types specified below correspond to the action_type of a field value
19551945
19561946
#### Get Field Values Changes
19571947

1958-
`GET /field-values-changes`
1948+
`GET /field-value-changes`
19591949

19601950
Returns all field value changes attached to a specific field. Field value changes can be filtered by action_type, person, organization, opportunity or list_entry by passing in the appropriate parameters.
19611951

@@ -4367,38 +4357,17 @@ curl "https://api.affinity.co/webhook/1234" -u :$APIKEY
43674357

43684358
`GET /entity-files/{entity_file_id}`
43694359

4370-
Fetch an entity file with a specified entity_file_id.
4360+
Fetches an entity with a specified `entity_file_id`.
43714361

43724362
#### Path Parameters
43734363

4374-
4375-
#### Example Request
4376-
4377-
```bash
4378-
curl -X POST "https://api.affinity.co/webhook/subscribe" \
4379-
-u :$APIKEY \
4380-
-d webhook_url="https://hooks.example.com/webhook"
4381-
```
4382-
4383-
#### Example Response
4384-
4385-
```json
4386-
{
4387-
"id": 1234,
4388-
"webhook_url": "https://hooks.example.com/webhook",
4389-
"subscriptions": [],
4390-
"disabled": false,
4391-
"created_by": 5678
4392-
}
4393-
```
4394-
43954364
| Parameter | Type | Required | Description |
43964365
|-----------|------|----------|-------------|
4397-
| entity_file_id | integer | true | The unique identifier of the entity file object. |
4366+
| entity_file_id | integer | true | The unique ID of the entity file that needs to be retrieved. |
43984367

4399-
#### Return
4368+
#### Returns
44004369

4401-
The entity file resource corresponding to the entity_file_id.
4370+
The entity file resource corresponding to the `entity_file_id`.
44024371

44034372
#### Example Request
44044373

@@ -4411,35 +4380,13 @@ curl "https://api.affinity.co/entity-files/43212" -u :$APIKEY
44114380
```json
44124381
{
44134382
"id": 43212,
4414-
"name": "example.pdf",
4415-
"size": 1024,
4416-
"person_id": 38706,
4417-
"organization_id": null,
4383+
"name": "GoogleFriends.csv",
4384+
"size": 993,
4385+
"person_id": null,
4386+
"organization_id": 10,
44184387
"opportunity_id": null,
4419-
"created_at": "2021-03-01T12:00:00Z"
4420-
}
4421-
```
4422-
4423-
4424-
#### Example Request
4425-
4426-
```bash
4427-
curl "https://api.affinity.co/webhook/1234" \
4428-
-u :$APIKEY \
4429-
-d webhook_url="https://hooks.example.com/webhook" \
4430-
-d disabled=true \
4431-
-X "PUT"
4432-
```
4433-
4434-
#### Example Response
4435-
4436-
```json
4437-
{
4438-
"id": 1234,
4439-
"webhook_url": "https://hooks.example.com/webhook",
4440-
"subscriptions": [],
4441-
"disabled": true,
4442-
"created_by": 5678
4388+
"created_at": "2011-01-25T09:59:35.288-08:00",
4389+
"uploader_id": 10
44434390
}
44444391
```
44454392

0 commit comments

Comments
 (0)