Collaborators
Interact with collaborators connected to your account.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the collaborator.
- Name
currency
- Type
- string
- Description
Currency set for the collaborator - ISO 4217 format, e.g. USD, EUR.
- Name
payout_measurement
- Type
- string
- Description
Payout measurement
month_day
,day
,week
ormonth
.
- Name
payout_frequency
- Type
- int
- Description
Day of the month for new payouts to be paid on. -1 or 1 - 28
- Name
payout_threshold
- Type
- int
- Description
Minimum payout total before the payout should be paid.
- Name
permissions
- Type
- object
- Description
View permissions for the collaborator
Properties
- Name
see_product_price
- Type
- bool
- Description
Show the price of collaborating products.
- Name
see_product_cost
- Type
- bool
- Description
Show the cost of collaborating products.
- Name
see_product_stock
- Type
- bool
- Description
Show the current stock level of collaborating products.
- Name
see_product_quantity
- Type
- bool
- Description
Show the quantity of collaborating products.
- Name
see_product_tax
- Type
- bool
- Description
Show the tax of collaborating products.
- Name
see_product_discount
- Type
- bool
- Description
Show the discount of collaborating products.
- Name
see_customer_name
- Type
- bool
- Description
Allow collaborator to view the customers name on an order.
- Name
see_customer_email
- Type
- bool
- Description
Allow collaborator to view the customers email address on an order.
- Name
see_order_status
- Type
- bool
- Description
Allow collaborator to view the status of an order.
- Name
see_order_payment_gateway
- Type
- bool
- Description
Allow collaborator to view the order gateway.
- Name
see_order_shipping_address
- Type
- bool
- Description
Allow collaborator to view the customers shipping address.
- Name
see_order_billing_address
- Type
- bool
- Description
Allow collaborator to view the customers billing address.
- Name
account
- Type
- object
- Description
Associated collaborator account.
Properties
- Name
name
- Type
- string
- Description
Account name
- Name
paypal_email
- Type
- string
- Description
PayPal email address for payouts.
- Name
is_managed
- Type
- bool
- Description
Account is managed by the store owner. This is only created via the API.
List all collaborators
This endpoint allows you to retrieve a paginated list of all your collaborators.
Optional attributes
- Name
limit
- Type
- integer
- Description
Limit the number of collaborators returned, defaults to 15. Max 100 per page.
- Name
page
- Type
- integer
- Description
Page number, defaults to page 1.
- Name
search
- Type
- string
- Description
Search for collaborator by name or email address.
Request
curl -G https://collabpay.app/api/v1/collaborators \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: Bearer {token}" \
-d page=1 \
-d limit=10
Response
{
"data": [
{
"id": "83863eae-3d54-458a-8671-8494cec025c2",
"currency": "USD",
"payout_measurement": "monthly_date",
"payout_frequency": -1,
"payout_threshold": 410,
"permissions": {
"see_product_price": false,
"see_product_quantity": false,
"see_product_discount": false,
"see_product_tax": false,
"see_customer_email": false,
"see_customer_name": false,
"see_order_status": false,
"see_order_payment_gateway": false,
"see_order_shipping_address": false,
"see_order_billing_address": false,
"see_product_cost": false,
"see_product_stock": false
},
"account": {
"name": "Test account one",
"paypal_email": null,
"is_managed": false
}
},
{
"id": "38f81dae-d025-42c7-bc48-e98b4e577f92",
"currency": "USD",
"payout_measurement": "month",
"payout_frequency": 1,
"payout_threshold": null,
"permissions": {
"see_product_price": false,
"see_product_quantity": false,
"see_product_discount": false,
"see_product_tax": false,
"see_customer_email": false,
"see_customer_name": false,
"see_order_status": false,
"see_order_payment_gateway": false,
"see_order_shipping_address": false,
"see_order_billing_address": false,
"see_product_cost": false,
"see_product_stock": false
},
"account": {
"name": "Test account two",
"paypal_email": null,
"is_managed": false
}
}
],
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://collabpay.app/api/v1/collaborators",
"per_page": 15,
"to": 2,
"total": 2
}
}
View a collaborator
This endpoint allows you to view a collaborator.
Request
curl -G https://collabpay.app/api/v1/collaborators/38f81dae-d025-42c7-bc48-e98b4e577f92 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: Bearer {token}"
Response
{
"data": {
"id": "38f81dae-d025-42c7-bc48-e98b4e577f92",
"currency": "USD",
"payout_measurement": "month",
"payout_frequency": 1,
"payout_threshold": null,
"permissions": {
"see_product_price": false,
"see_product_quantity": false,
"see_product_discount": false,
"see_product_tax": false,
"see_customer_email": false,
"see_customer_name": false,
"see_order_status": false,
"see_order_payment_gateway": false,
"see_order_shipping_address": false,
"see_order_billing_address": false,
"see_product_cost": false,
"see_product_stock": false
},
"account": {
"name": "Test account two",
"paypal_email": null,
"is_managed": false
}
}
}
Create a collaborator
Create a collaborator.
Required attributes
- Name
first_name
- Type
- string
- Description
First name of the user the account is for. This is required when
is_managed
is false.
- Name
last_name
- Type
- string
- Description
Last name of the user the account is for. This is required when
is_managed
is false.
- Name
account_name
- Type
- string
- Description
Name of the account / business name.
- Name
email
- Type
- string
- Description
Email address for the users account. This is required when
is_managed
is false.
- Name
is_managed
- Type
- bool
- Description
Managed account - when true no invite email will be sent and they will not have access to the account. You can still manage the collaborator via the UI.
Managed accounts can only be created via the API.
- Name
payout_frequency
- Type
- int
- Description
Day of the month that payouts should be paid on.
When
payout_measurement
is set tomonth_day
1 = 1st
2 = 2nd
3 = 3rd
...
28 = 28th
-1 = last day of the monthWhen
payout_measurement
isday
,week
ormonth
any positive number is allowed.E.g.
payout_measurement
is set today
, andpayout_frequency
is set to5
. When a payout is created, it'll be set to be paid in 5 days.
- Name
payout_measurement
- Type
- string
- Description
Possible values
month_day
,day
,week
ormonth
.
- Name
currency
- Type
- string
- Description
Currency set for the collaborator - ISO 4217 format, e.g. USD, EUR.
- Name
see_product_price
- Type
- bool
- Description
Show the price of collaborating products.
- Name
see_product_cost
- Type
- bool
- Description
Show the cost of collaborating products.
- Name
see_product_stock
- Type
- bool
- Description
Show the current stock level of collaborating products.
- Name
see_product_quantity
- Type
- bool
- Description
Show the quantity of collaborating products.
- Name
see_product_tax
- Type
- bool
- Description
Show the tax of collaborating products.
- Name
see_product_discount
- Type
- bool
- Description
Show the discount of collaborating products.
- Name
see_customer_name
- Type
- bool
- Description
Allow collaborator to view the customers name on an order.
- Name
see_customer_email
- Type
- bool
- Description
Allow collaborator to view the customers email address on an order.
- Name
see_order_status
- Type
- bool
- Description
Allow collaborator to view the status of an order.
- Name
see_order_payment_gateway
- Type
- bool
- Description
Allow collaborator to view the order gateway.
- Name
see_order_shipping_address
- Type
- bool
- Description
Allow collaborator to view the customers shipping address.
- Name
see_order_billing_address
- Type
- bool
- Description
Allow collaborator to view the customers billing address.
optional attributes
- Name
payout_threshold
- Type
- int
- Description
Threshold for the payout.
- Name
paypal_email
- Type
- string, max(255)
- Description
PayPal email address for the account.
Example request for a non managed account
curl -G -X POST https://collabpay.app/api/v1/collaborators/38f81dae-d025-42c7-bc48-e98b4e577f92 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: Bearer {token}" \
-d {
"first_name": "John",
"last_name": "Smith",
"account_name": "Johns shoe store",
"email": "john@example.com",
"is_managed": false,
"payout_frequency": -1,
"payout_measurement": "monthly_date",
"payout_threshold": 1500,
"currency": "AUD",
"see_product_stock": true,
"see_product_cost": true,
"see_product_price": true,
"see_product_quantity": true,
"see_product_discount": true,
"see_product_tax": true,
"see_customer_name": true,
"see_customer_email": true,
"see_order_status": true,
"see_order_payment_gateway": true,
"see_order_shipping_address": true,
"see_order_billing_address": true
}
Response
{
"data": {
"id": "83863eae-3d54-458a-8671-8494cec025c2",
"currency": "AUD",
"payout_measurement": "monthly_date",
"payout_frequency": -1,
"payout_threshold": 1500,
"permissions": {
"see_product_price": false,
"see_product_quantity": false,
"see_product_discount": false,
"see_product_tax": false,
"see_customer_email": false,
"see_customer_name": false,
"see_order_status": false,
"see_order_payment_gateway": false,
"see_order_shipping_address": false,
"see_order_billing_address": false,
"see_product_cost": false,
"see_product_stock": false
},
"account": {
"name": "Johns shoe store",
"paypal_email": null,
"is_managed": false
}
}
}
Update a collaborator
This endpoint allows you to perform an update on a collaborator.
required attributes
- Name
account_name
- Type
- string
- Description
Update the name account name. This can only be changed if the account is managed.
- Name
payout_frequency
- Type
- int
- Description
Day of the month that payouts should be paid on.
When
payout_measurement
is set tomonth_day
1 = 1st
2 = 2nd
3 = 3rd
...
28 = 28th
-1 = last day of the monthWhen
payout_measurement
isday
,week
ormonth
any positive number is allowed.E.g.
payout_measurement
is set today
, andpayout_frequency
is set to5
. When a payout is created, it'll be set to be paid in 5 days.
- Name
payout_measurement
- Type
- string
- Description
Possible values
month_day
,day
,week
ormonth
.
- Name
currency
- Type
- string
- Description
Currency set for the collaborator - ISO 4217 format, e.g. USD, EUR.
- Name
see_product_price
- Type
- bool
- Description
Show the price of collaborating products.
- Name
see_product_cost
- Type
- bool
- Description
Show the cost of collaborating products.
- Name
see_product_stock
- Type
- bool
- Description
Show the current stock level of collaborating products.
- Name
see_product_quantity
- Type
- bool
- Description
Show the quantity of collaborating products.
- Name
see_product_tax
- Type
- bool
- Description
Show the tax of collaborating products.
- Name
see_product_discount
- Type
- bool
- Description
Show the discount of collaborating products.
- Name
see_customer_name
- Type
- bool
- Description
Allow collaborator to view the customers name on an order.
- Name
see_customer_email
- Type
- bool
- Description
Allow collaborator to view the customers email address on an order.
- Name
see_order_status
- Type
- bool
- Description
Allow collaborator to view the status of an order.
- Name
see_order_payment_gateway
- Type
- bool
- Description
Allow collaborator to view the order gateway.
- Name
see_order_shipping_address
- Type
- bool
- Description
Allow collaborator to view the customers shipping address.
- Name
see_order_billing_address
- Type
- bool
- Description
Allow collaborator to view the customers billing address.
optional attributes
- Name
payout_threshold
- Type
- int
- Description
Threshold for the payout.
- Name
paypal_email
- Type
- string, max(255)
- Description
PayPal email address for the account. This can only be changed if the account is managed.
Request
curl -G -X PUT https://collabpay.app/api/v1/collaborators/38f81dae-d025-42c7-bc48-e98b4e577f92 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H "Authorization: Bearer {token}" \
-d {
"payout_frequency": 15,
"payout_measurement": "month",
"payout_threshold": 1500,
"currency": "AUD",
"see_product_stock": true,
"see_product_cost": true,
"see_product_price": true,
"see_product_quantity": true,
"see_product_discount": true,
"see_product_tax": true,
"see_customer_name": true,
"see_customer_email": true,
"see_order_status": true,
"see_order_payment_gateway": true,
"see_order_shipping_address": true,
"see_order_billing_address": true
}
Response
{
"data": {
"id": "83863eae-3d54-458a-8671-8494cec025c2",
"currency": "USD",
"payout_measurement": "monthly_date",
"payout_frequency": -1,
"payout_threshold": 410,
"permissions": {
"see_product_price": false,
"see_product_quantity": false,
"see_product_discount": false,
"see_product_tax": false,
"see_customer_email": false,
"see_customer_name": false,
"see_order_status": false,
"see_order_payment_gateway": false,
"see_order_shipping_address": false,
"see_order_billing_address": false,
"see_product_cost": false,
"see_product_stock": false
},
"account": {
"name": "Test account one",
"paypal_email": null,
"is_managed": false
}
}
}
Delete a collaborator
This endpoint allows you to delete collaborators. When deleting a collaborator this will also remove all connected products.
Request
curl -X DELETE https://collabpay.app/api/v1/collaborators/38f81dae-d025-42c7-bc48-e98b4e577f92 \
-H 'Content-Type: application/json'
-H 'Accept: application/json'
-H "Authorization: Bearer {token}"