Buyers
Buyers in Kojo represent an organization that has placed orders with your company.
Schema​
Buyer​
| Name | Type | Description | Example |
|---|---|---|---|
| id | ID | The unique buyer ID | "ckmnpybisiy5x08abky4g2d1f" |
| name | string | The name of the buyer | "Kojo Systems Mars HQ" |
| phone | string? | The phone number for the buyer | "513-123-4567" |
| customerAccountNumbers | object? | Code that represents the customer in the Vendor's System | {"send": "TESTCC", "receive": ["TESTCC"]} |
| location | Location? | The location/address of the buyer |
CustomerAccountNumbers​
| Name | Type | Description | Example |
|---|---|---|---|
| send | string | The account number to send to the buyer | "TESTCC" |
| receive | string[] | Array of account numbers received from buyer | ["TESTCC", "ALT123"] |
REST Endpoints​
GET /buyers​
Read all buyers that have placed orders with your company, with pagination and sorting.
Parameters​
Accepts all standard pagination parameters.
Allowed orderBy fields: name, id, createdAt, updatedAt
Response​
A list of Buyer objects.
Example Request​
GET https://api.kojo.tech/seller/buyers
Example Response​
[
{
"id": "cl7g8gwry0451ccr778c2gngo",
"name": "Dunder Mifflin",
"phone": "650-382-9052",
"customerAccountNumbers": {
"send": "TESTCC",
"receive": ["TESTCC"]
},
"location": {
"name": "Agora HQ - Receiving",
"addressLine1": "637 Natoma St.",
"addressLine2": "#7",
"city": "San Francisco",
"state": "CA",
"zipcode": "94103",
"directions": "instructions",
"phone": "415-623-7898"
}
},
{
"id": "cl7g8gwry0451ccr778c2gngo2",
"name": "Acme Construction",
"phone": "555-123-4567",
"customerAccountNumbers": {
"send": "ACME001",
"receive": ["ACME001", "ACME-ALT"]
},
"location": {
"name": "Acme Main Office",
"addressLine1": "123 Construction Way",
"city": "San Francisco",
"state": "CA",
"zipcode": "94105",
"phone": "555-123-4568"
}
}
]
Example Request with Pagination and Sorting​
The following example will return the first 50 buyers ordered by name in ascending order.
GET https://api.kojo.tech/seller/buyers?limit=50&offset=0&orderBy=name&direction=ASC