Counterparties API Reference
Discover how to search, retrieve, archive and unarchive customers and vendors using the counterparty API.
List customer counterparties
This endpoint allows you to retrieve a paginated list of all your customers.
Query Parameters
- Name
limit
- Type
- integer
- Field Type
optional
- Description
Limit the number of customers returned. (default is 10)
- Name
page
- Type
- integer
- Field Type
optional
- Description
Page number for pagination. (default is 1)
- Name
name
- Type
- string
- Field Type
optional
- Description
Filter records by name.
- Name
email
- Type
- string
- Field Type
optional
- Description
Filter records by email.
- Name
phone
- Type
- string
- Field Type
optional
- Description
Filter records by phone.
- Name
archived
- Type
- boolean
- Field Type
optional
- Description
Filter records by archived.
Request
curl --request GET \
"https://payments.your-domain.com/api/v1/customers" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"data": [
{
"id": "98ed68ce-6964-4c2a-9430-8a849e373c52",
"name": "john",
"email": "john@yxz.com",
"contact_first_name": "John",
"contact_last_name": "Doe",
"phone": null,
"website": "https://crater.financial",
"is_customer": true,
"is_vendor": false,
"logo_url": null,
"business_type": null,
"created_at": 1701150335,
"time_zone": "America/New_York",
"archived": false,
"due_amount": "0.00",
"disabled": false,
"payment_onboarding": {},
"underwriting_status": {
"bnpl": "PENDING",
"factoring": "PENDING"
},
"billing_address": {
"name": "billing address",
"address_street_1": "Address 1",
"address_street_2": "Address 2",
"city": "Los Angeles",
"state": "CA",
"zip": "91504",
"phone": "2345557788"
},
"shipping_address": {
"name": "shipinng address",
"address_street_1": "Address 1",
"address_street_2": "Address 2",
"city": "Los Angeles",
"state": "CA",
"zip": "91504",
"phone": "2345557788"
},
"creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8",
"creator_business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}, {...}
]
}
Add customer counterparty
This endpoint allows you to add a new customer to your customer list.
Body Parameters
- Name
customer_business_id
- Type
- string
- Field Type
required
- Description
The ID of the customer business.
Request
curl "https://payments.your-domain.com/api/v1/customers" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"customer_business_id\": \"98ed68ce-6964-4c2a-9430-8a849e373c52\",
}"
Response
{
"action": "existing_business_attached",
"business": {
"id": "98ed68ce-6964-4c2a-9430-8a849e373c52",
"name": "john",
"email": "john@yxz.com",
"contact_first_name": "John",
"contact_last_name": "Doe",
"phone": null,
"website": "https://crater.financial",
"is_customer": true,
"is_vendor": false,
"logo_url": null,
"business_type": null,
"created_at": 1701150335,
"time_zone": "America/New_York",
"archived": false,
"due_amount": "0.00",
"disabled": false,
"payment_onboarding": {},
"underwriting_status": {
"bnpl": "PENDING",
"factoring": "PENDING"
},
"billing_address": {
"name": "billing address",
"address_street_1": "Address 1",
"address_street_2": "Address 2",
"city": "Los Angeles",
"state": "CA",
"zip": "91504",
"phone": "2345557788"
},
"shipping_address": {
"name": "shipinng address",
"address_street_1": "Address 1",
"address_street_2": "Address 2",
"city": "Los Angeles",
"state": "CA",
"zip": "91504",
"phone": "2345557788"
},
"creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8",
"creator_business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
}
}
Retrieve a customer counterparty
This endpoint allows you to retrieve a customer by providing their id.
URL Parameters
- Name
customer_business_id
- Type
- string
- Field Type
required
- Description
The ID of the customer.
Request
curl --request GET \
--get "https://payments.your-domain.com/api/v1/customers/98ed68ce-6964-4c2a-9430-8a849e373c52" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"data": {
"id": "98ed68ce-6964-4c2a-9430-8a849e373c52",
"name": "john",
"email": "john@yxz.com",
"contact_first_name": "John",
"contact_last_name": "Doe",
"phone": null,
"website": "https://crater.financial",
"is_customer": true,
"is_vendor": false,
"logo_url": null,
"business_type": null,
"created_at": 1701150335,
"time_zone": "America/New_York",
"archived": false,
"due_amount": "0.00",
"disabled": false,
"payment_onboarding": {},
"underwriting_status": {
"bnpl": "PENDING",
"factoring": "PENDING"
},
"creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8",
"creator_business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
}
}
Archive customers
This endpoint allows you to archive customers.
Body Parameters
- Name
customer_business_ids
- Type
- array
- Field Type
required
- Description
The IDs of the customers.
Request
curl "https://payments.your-domain.com/api/v1/customers/archive" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"customer_business_ids\": [\"98ed68ce-6964-4c2a-9430-8a849e373c52\"]
}"
Response
{
"success": true,
"message": "Selected customers have been archived successfully"
}
Unarchive customers
This endpoint allows you to unarchive customers.
Body Parameters
- Name
customer_business_ids
- Type
- array
- Field Type
required
- Description
The IDs of the customers.
Request
curl "https://payments.your-domain.com/api/v1/customers/unarchive" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"customer_business_ids\": [\"98ed68ce-6964-4c2a-9430-8a849e373c52\"]
}"
Response
{
"success": true,
"message": "Selected customers have been unarchived successfully"
}
List vendor counterparties
This endpoint allows you to retrieve a paginated list of all your vendors.
Optional Parameters
- Name
limit
- Type
- integer
- Field Type
optional
- Description
Limit the number of vendors returned. (default is 10)
- Name
page
- Type
- integer
- Field Type
optional
- Description
Page number for pagination. (default is 1)
- Name
name
- Type
- string
- Field Type
optional
- Description
Filter records by name.
- Name
email
- Type
- string
- Field Type
optional
- Description
Filter records by email.
- Name
phone
- Type
- string
- Field Type
optional
- Description
Filter records by phone.
- Name
archived
- Type
- boolean
- Field Type
optional
- Description
Filter records by archived.
Request
curl --request GET \
"https://payments.your-domain.com/api/v1/vendors" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"data": [
{
"id": "9b7f0d35-844f-4053-a8e2-bbc25cc99c6e",
"name": "john",
"email": "vendor@yxz.com",
"contact_first_name": "John",
"contact_last_name": "Doe",
"phone": null,
"website": "https://crater.financial",
"is_customer": false,
"is_vendor": true,
"logo_url": null,
"business_type": null,
"created_at": 1701150335,
"time_zone": "America/New_York",
"archived": false,
"due_amount": "0.00",
"disabled": false,
"payment_onboarding": {},
"underwriting_status": {
"bnpl": "PENDING",
"factoring": "PENDING"
},
"billing_address": {
"name": "billing address",
"address_street_1": "Address 1",
"address_street_2": "Address 2",
"city": "Los Angeles",
"state": "CA",
"zip": "91504",
"phone": "2345557788"
},
"shipping_address": {
"name": "shipinng address",
"address_street_1": "Address 1",
"address_street_2": "Address 2",
"city": "Los Angeles",
"state": "CA",
"zip": "91504",
"phone": "2345557788"
},
"creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8",
"creator_business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d"
}, {...}
]
}
Add vendor counterparty
This endpoint allows you to add a new vendor to your vendor list.
Parameters
- Name
vendor_busness_id
- Type
- string
- Field Type
required
- Description
The ID of the vendor.
Request
curl "https://payments.your-domain.com/api/v1/vendor" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"vendor_business_id\": \"9b7f0d35-844f-4053-a8e2-bbc25cc99c6e\",
}"
Response
{
"data": {
"id": "9b7f0d35-844f-4053-a8e2-bbc25cc99c6e",
"name": "john",
"email": "vendor@yxz.com",
"contact_first_name": "John",
"contact_last_name": "Doe",
"phone": null,
"website": "https://crater.financial",
"is_customer": false,
"is_vendor": true,
"logo_url": null,
"business_type": null,
"created_at": 1701150335,
"time_zone": "America/New_York",
"archived": false,
"due_amount": "0.00",
"disabled": false,
"payment_onboarding": {},
"underwriting_status": {
"bnpl": "PENDING",
"factoring": "PENDING"
},
"billing_address": {
"name": "billing address",
"address_street_1": "Address 1",
"address_street_2": "Address 2",
"city": "Los Angeles",
"state": "CA",
"zip": "91504",
"phone": "2345557788"
},
"shipping_address": {
"name": "shipinng address",
"address_street_1": "Address 1",
"address_street_2": "Address 2",
"city": "Los Angeles",
"state": "CA",
"zip": "91504",
"phone": "2345557788"
},
"creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8",
"creator_business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
}
}
Retrieve a vendor counterparty
This endpoint allows you to retrieve a vendor by providing their id.
Url Parameters
- Name
vendor_business_id
- Type
- string
- Field Type
required
- Description
The ID of the vendor business.
Request
curl --request GET \
--get "https://payments.your-domain.com/api/v1/vendors/9b7f0d35-844f-4053-a8e2-bbc25cc99c6e" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
Response
{
"data": {
"id": "9b7f0d35-844f-4053-a8e2-bbc25cc99c6e",
"name": "john",
"email": "vendor@yxz.com",
"contact_first_name": "John",
"contact_last_name": "Doe",
"phone": null,
"website": "https://crater.financial",
"is_customer": false,
"is_vendor": true,
"logo_url": null,
"business_type": null,
"created_at": 1701150335,
"time_zone": "America/New_York",
"archived": false,
"due_amount": "0.00",
"disabled": false,
"payment_onboarding": {},
"underwriting_status": {
"bnpl": "PENDING",
"factoring": "PENDING"
},
"creator_id": "9bdf9dc1-6ca1-4e3c-bc91-84d0f607d6d8",
"creator_business_id": "995c98ce-cdd9-4ef6-b018-9c696cb07e9d",
}
}
Archive vendors
This endpoint allows you to archive vendors.
Body Parameters
- Name
vendor_business_ids
- Type
- array
- Field Type
required
- Description
The IDs of the vendors.
Request
curl "https://payments.your-domain.com/api/v1/vendors/archive" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"vendor_business_ids\": [\"9b7f0d35-844f-4053-a8e2-bbc25cc99c6e\"]
}"
Response
{
"success": true,
"message": "Selected vendors have been archived successfully"
}
Unarchive vendors
This endpoint allows you to unarchive vendors.
Body Parameters
- Name
vendor_business_ids
- Type
- array
- Field Type
required
- Description
The IDs of the vendors.
Request
curl "https://payments.your-domain.com/api/v1/vendors/unarchive" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Business: 995c98ce-cdd9-4ef6-b018-9c696cb07e9d" \
--data "{
\"vendor_business_ids\": [\"9b7f0d35-844f-4053-a8e2-bbc25cc99c6e\"]
}"
Response
{
"success": true,
"message": "Selected vendors have been unarchived successfully"
}