List Purchasers
Retrieves a list of purchasers.
HTTP Request
GET https://api.cdr.fyi/v1/purchasers
Query Parameters
Parameter | Type | Description |
---|
entityFilterType | String | Filter by entity type (Supplier, Marketplace, Purchaser) |
entityFilterId | String | Filter by entity ID |
x-page
: The page number (default is 1)
x-limit
: Number of items per page (max 100, default is 10)
Example Request
curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" "https://api.cdr.fyi/purchasers?entityFilterType=Purchaser&entityFilterId=123"
This endpoint creates a new purchaser or updates an existing one by upserting based on the `purchaser_id`.
`POST https://api.cdr.fyi/v1/purchasers`
- **Authorization**: Bearer YOUR_ACCESS_TOKEN
- **Content-Type**: application/json
| Parameter | Type | Description | Required |
|--------------------|----------|------------------------------------------------------|----------|
| purchaser_id | String | Unique identifier for the purchaser | No |
| name | String | Name of the purchaser | Yes |
| methods | String | Payment methods available | No |
| website | String | Website URL | No |
| logo | String | Logo URL | No |
| slug | String | URL slug | No |
| tagline | String | Tagline | No |
| description | String | Description (max 500 characters) | No |
| year_founded | Integer | Year founded | No |
| geo_city | String | Geographic city | No |
| geo_country | String | Geographic country | No |
| twitter | String | Twitter handle | No |
| is_verified | Boolean | Verification status | No |
Example Request
```bash
curl -X GET https://api.cdr.fyi/v1/purchasers \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
Example Response
{
"purchasers": [{
"purchaser_id": "pur_sample",
"name": "Sample Purchaser",
"methods": "Wire Transfer",
"website": "https://sample.com",
"logo": "https://sample.com/logo.png",
"slug": "sample-purchaser",
"tagline": "The best purchaser",
"description": "This is a sample purchaser",
"year_founded": 2005,
"geo_city": "London",
"geo_country": "UK",
"twitter": "@sample",
"is_verified": true
}]
}
Error Responses
If the request is not successful, you will receive a 400 Bad Request or 401 Unauthorized response along with an error message indicating the issue.