Skip to content

Commit c3a17f8

Browse files
committed
Fix regressions in v1 API documentation
Fixed 3 regressions introduced in previous commits and added 1 missing detail: 1. Create Person: Changed last_name from false to true (required) - Regression from commit de7e51f - Browser validation: confirmed last_name is required field 2. Relationship Strengths: Removed misplaced 103-line reminders example - Regression from commit de7e51f - This section should only have /relationships-strengths examples - Removed entire /reminders API response that didn't belong here 3. Update Organization: Fixed POST to PUT and added proper example - Regression from commit 5e1a6ca - Changed curl -X POST to curl -X PUT - Added organization_id path parameter to example - Added complete example response 4. Rate Limit: Added missing exemption note (pre-existing, not regression) - Added note that /rate-limit and /auth/whoami are exempt from organization-level monthly rate limits - This was in the live docs but never documented in markdown All changes validated against live browser content at api-docs.affinity.co Net change: -97 lines (removed bad content, added missing note)
1 parent c41248d commit c3a17f8

1 file changed

Lines changed: 22 additions & 119 deletions

File tree

docs/v1/affinity_api_docs.md

Lines changed: 22 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -2282,7 +2282,7 @@ Create a new person with the supplied parameters.
22822282
| Parameter | Type | Required | Description |
22832283
|-----------|------|----------|-------------|
22842284
| first_name | string | true | The first name of the person. |
2285-
| last_name | string | false | The last name of the person. |
2285+
| last_name | string | true | The last name of the person. |
22862286
| emails | string[] | true | The email addresses of the person. |
22872287
| organization_ids | integer[] | false | An array of unique identifiers of organizations that the person is associated with. |
22882288

@@ -2788,10 +2788,23 @@ The organization resource that was just created by a successful request.
27882788

27892789
#### Update an Organization
27902790

2791+
`PUT /organizations/{organization_id}`
2792+
2793+
Update an existing organization with organization_id with the supplied parameters.
2794+
2795+
#### Return
2796+
2797+
The organization resource that was just updated through a successful request.
2798+
2799+
#### If you are looking to add an existing organization to a list, please check the List Entries section of the API
2800+
2801+
> **Note**
2802+
> If you are trying to add a person to an organization, the existing values for person_id must also be passed into the endpoint.
2803+
27912804
#### Example Request
27922805

27932806
```bash
2794-
curl -X POST "https://api.affinity.co/organizations" \
2807+
curl -X PUT "https://api.affinity.co/organizations/120611418" \
27952808
-u :$APIKEY \
27962809
-H "Content-Type: application/json" \
27972810
-d '{"name": "Acme Corporation", "domain": "acme.co", "person_ids": [38706]}'
@@ -2801,23 +2814,13 @@ curl -X POST "https://api.affinity.co/organizations" \
28012814

28022815
```json
28032816
{
2804-
"id": 123
2817+
"id": 120611418,
2818+
"name": "Acme Corporation",
2819+
"domain": "acme.co",
2820+
"person_ids": [38706]
28052821
}
28062822
```
28072823

2808-
`PUT /organizations/{organization_id}`
2809-
2810-
Update an existing organization with organization_id with the supplied parameters.
2811-
2812-
#### Return
2813-
2814-
The organization resource that was just updated through a successful request.
2815-
2816-
#### If you are looking to add an existing organization to a list, please check the List Entries section of the API
2817-
2818-
> **Note**
2819-
> If you are trying to add a person to an organization, the existing values for person_id must also be passed into the endpoint.
2820-
28212824
#### Delete an Organization
28222825

28232826
`DELETE /organizations/{organization_id}`
@@ -3486,109 +3489,6 @@ Returns an array of relationship strengths matching the criteria.
34863489
| external_id | integer | true | The external person associated with this relationship strength. |
34873490
| internal_id | integer | false | The internal person associated with this relationship strength. |
34883491

3489-
3490-
#### Example Request
3491-
3492-
```bash
3493-
curl "https://api.affinity.co/reminders?page_size=2&status=2" -u :$APIKEY
3494-
```
3495-
3496-
#### Example Response
3497-
3498-
```json
3499-
{
3500-
"reminders": [
3501-
{
3502-
"id": 15562,
3503-
"type": 1,
3504-
"created_at": "2021-11-22T09:31:52.415-08:00",
3505-
"completed_at": null,
3506-
"content": "Recurring reminder",
3507-
"due_date": "2021-12-22T09:31:52.415-08:00",
3508-
"reset_type": 0,
3509-
"reminder_days": 30,
3510-
"status": 2,
3511-
"creator": {
3512-
"id": 443,
3513-
"type": 1,
3514-
"first_name": "John",
3515-
"last_name": "Doe",
3516-
"primary_email": "john@affinity.co",
3517-
"emails": [
3518-
"john@affinity.co"
3519-
]
3520-
},
3521-
"owner": {
3522-
"id": 443,
3523-
"type": 1,
3524-
"first_name": "John",
3525-
"last_name": "Doe",
3526-
"primary_email": "john@affinity.co",
3527-
"emails": [
3528-
"john@affinity.co"
3529-
]
3530-
},
3531-
"completer": null,
3532-
"person": null,
3533-
"organization": {
3534-
"id": 4904,
3535-
"name": "organization",
3536-
"domain": null,
3537-
"domains": [],
3538-
"crunchbase_uuid": null,
3539-
"global": false
3540-
},
3541-
"opportunity": null
3542-
},
3543-
{
3544-
"id": 15326,
3545-
"type": 1,
3546-
"created_at": "2021-11-18T14:34:53.218-08:00",
3547-
"completed_at": null,
3548-
"content": "Reply email to Alice",
3549-
"due_date": "2021-12-18T14:34:53.217-08:00",
3550-
"reset_type": 1,
3551-
"reminder_days": 30,
3552-
"status": 2,
3553-
"creator": {
3554-
"id": 443,
3555-
"type": 1,
3556-
"first_name": "John",
3557-
"last_name": "Doe",
3558-
"primary_email": "john@affinity.co",
3559-
"emails": [
3560-
"john@affinity.co"
3561-
]
3562-
},
3563-
"owner": {
3564-
"id": 443,
3565-
"type": 1,
3566-
"first_name": "John",
3567-
"last_name": "Doe",
3568-
"primary_email": "john@affinity.co",
3569-
"emails": [
3570-
"john@affinity.co"
3571-
]
3572-
},
3573-
"completer": null,
3574-
"person": {
3575-
"id": 2021,
3576-
"type": 0,
3577-
"first_name": "Alice",
3578-
"last_name": "Yen",
3579-
"primary_email": "yen@alice.com",
3580-
"emails": [
3581-
"yen@alice.com"
3582-
]
3583-
},
3584-
"organization": null,
3585-
"opportunity": null
3586-
}
3587-
],
3588-
"next_page_token": "eyJwYXJhbXMiOnsiY29tcGxldGVyX2lkIjpudWxsLCJvd25lcl9pZCI6bnVsbCwiY3JlYXRvcl9"
3589-
}
3590-
```
3591-
35923492
#### Example Request
35933493

35943494
```bash
@@ -4711,6 +4611,9 @@ Querying the rate limit endpoint will yield information about account (AKA organ
47114611

47124612
The rate limit resource, a JSON body of data including limit, calls remaining, seconds until reset and calls count for both organization-level monthly limits and API key-level per-minute limits.
47134613

4614+
> **Note**
4615+
> `/rate-limit` and `/auth/whoami` endpoints are exempt from organization-level monthly rate limits.
4616+
47144617
#### Example Request
47154618

47164619
```bash

0 commit comments

Comments
 (0)