Customers
Customer is a person/company who signed up to your application using a unique affiliate link that has been shared by your affiliate program partner.
Create a customer
Create a new customer with required or desired data. While creating a customer you need to create a unique key for the customer. You will be using this key to identify customers.
The data payload should contain customer data directly and a partner
data object. The most important is partner
data object to identify the partner.
POST https://api.partnero.com/v1/customers
Request example
{
"partner": {
"key": "ref_123"
},
"key": "customer_123",
"email": "alice.brown@partnero.com",
"name": "Alice",
"surname": "Brown"
}
Request parameters
Parameters | Type | Required | Details |
---|---|---|---|
key | string | yes | The main identification of the customer. Can be anything, but we recommend using an account ID or customer's email address. This will be required when creating transactions for the customer. |
email | string | optional | Must be a unique email address. |
name | string | optional | A name for the customer. |
surname | string | optional | A surname for the customer. |
partner | object[] | yes | Partner data. |
partner.key | string | yes | Must provide the partner's key to whom you are willing to create a customer. Should be populated with *UNIQUE_PARTNER_KEY . |
partner.id | string | optional | Alternatively, Partner ID can be used instead of key . |
partner.email | string | optional | Alternatively, Partner email address can be used instead of key . |
options | object[] | optional | Additional parameters. |
options.referral_url | string | optional | Option to pass an additional **referral URL to identify signups from different URLs when multi-links are used. |
*You have to populate partner.key
data object with UNIQUE_PARTNER_KEY
, which is saved in partnero_partner
cookie created by our universal javascript snippet or can be identified from the URL.
**The URL must be a unique referral URL which was assigned to a partner.
Response
{
"data": {
"key": "customer_123",
"partner": "partner_123",
"deleted": false,
"name": "Alice",
"surname": "Brown",
"email": "alice.brown@partnero.com",
"created_at": "2025-05-02T16:12:39.000000Z",
"updated_at": "2025-05-02T16:12:39.000000Z",
"deleted_at": null
},
"status": 1
}
Response Code: 201 Created
Content-Type: application/json
Fetch a customer
Get the details about a specific customer. You need to provide either an email address or a unique key of the customer.
GET https://api.partnero.com/v1/customers/{key}
Request example
GET https://api.partnero.com/v1/customers/customer_123
Request parameters
Parameters | Type | Required | Details |
---|---|---|---|
key | string | yes |
Response
{
"data": {
"key": "customer_123",
"partner": "partner_123",
"deleted": false,
"name": "Alice",
"surname": "Brown",
"email": "alice.brown@partnero.com",
"created_at": "2025-05-02T16:12:39.000000Z",
"updated_at": "2025-05-02T16:12:39.000000Z",
"deleted_at": null
},
"status": 1
}
Response Code: 200 OK
Content-Type: application/json
Get all customers
Get the list of customers that belong to your program.
GET https://api.partnero.com/v1/customers
Request parameters
Parameters | Type | Required | Details |
---|---|---|---|
limit | integer | no | A limit on the number of items to be returned. Limits can range between 1 and 250, and the default is 15. |
page | integer | no | The default is 1. |
Response
{
"data": [
{
"key": "customer_123",
"partner": "partner_123",
"deleted": false,
"name": "Alice",
"surname": "Brown",
"email": "alice.brown@partnero.com",
"created_at": "2025-05-02T16:12:39.000000Z",
"updated_at": "2025-05-02T16:12:39.000000Z",
"deleted_at": null
}
],
"links": {
"first": "https://api.partnero.com/v1/customers?page=1",
"last": null,
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"path": "https://api.partnero.com/v1/customers",
"per_page": 10,
"to": 1
},
"status": 1
}
Response Code: 200 OK
Content-Type: application/json
Find a customer
Search for customers.
GET https://api.partnero.com/v1/customers:search
Request example
GET https://api.partnero.com/v1/customers:search?email=alice.brown@partnero.com
GET https://api.partnero.com/v1/customers:search?key=customer_123
Available search query parameters
Parameters | Type | Required | Details |
---|---|---|---|
key | string | optional | |
email | string | optional |
Response
{
"data": [
{
"key": "customer_123",
"partner": "partner_123",
"deleted": false,
"name": "Alice",
"surname": "Brown",
"email": "alice.brown@partnero.com",
"created_at": "2025-05-02T16:12:39.000000Z",
"updated_at": "2025-05-02T16:12:39.000000Z",
"deleted_at": null
}
],
"links": {
"first": "https://api.partnero.com/v1/customers:search?page=1",
"last": null,
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"path": "https://api.partnero.com/v1/customers:search",
"per_page": 10,
"to": 1
},
"status": 1
}
Response Code: 200 OK
Content-Type: application/json
Get customer transactions
Get all transactions made by a customer.
GET https://api.partnero.com/v1/customers/{key}/transactions
Request example
GET https://api.partnero.com/v1/customers/customer_123/transactions
Request parameters
Parameters | Type | Required | Details |
---|---|---|---|
key | string | yes |
Response
{
"data": [
{
"key": "transaction_123",
"action": "sale",
"amount": 100,
"partner": "partner_123",
"customer": "customer_123",
"credit": false,
"is_currency": true,
"amount_units": "USD",
"created_at": "2025-05-02T17:51:26.000000Z",
"deleted_at": null,
"rewards": [
{
"key": "transaction_123",
"action": "sale",
"status": "ok",
"customer": "customer_123",
"partner": "partner_123",
"amount": 30,
"amount_units": "USD",
"is_currency": true,
"credit": false,
"created_at": "2025-05-02T17:51:26.000000Z",
"deleted_at": null,
"product_type_data": []
}
]
},
...
],
"status": 1
}
Response Code: 200 OK
Content-Type: application/json
Update a customer
Update an existing customer.
PUT https://api.partnero.com/v1/customers/{key}
Request example
PUT https://api.partnero.com/v1/customers/customer_123
{
"update": {
"name": "Alice updated",
"surname": "Brown updated"
}
}
Request parameters
Parameters | Type | Required | Details |
---|---|---|---|
key | string | yes * | Must provide either key or email of the customer if key is not provided in URL. |
email | string | yes * | Must provide either email or key of the customer if key is not provided in URL. |
update | object[] | optional | |
update.name | string | optional | Updates/adds a name of the customer. |
update.surname | string | optional | Updates/adds a surname of the customer. |
update.email | string | optional | Updates/adds an email of the customer. |
update.key | string | optional | Updates/adds a key of the customer. |
Response
{
"data": {
"key": "customer_123",
"partner": "partner_123",
"deleted": false,
"name": "Alice updated",
"surname": "Brown updated",
"email": "alice.brown@partnero.com",
"created_at": "2025-05-02T16:12:39.000000Z",
"updated_at": "2025-05-02T18:07:10.000000Z",
"deleted_at": null
},
"status": 1
}
Response Code: 200 OK
Content-Type: application/json
Delete a customer
Delete an existing customer.
DELETE https://api.partnero.com/v1/customers/{key}
Request example
DELETE https://api.partnero.com/v1/customers/customer_123
Request parameters
Parameters | Type | Required | Details |
---|---|---|---|
key | string | yes * | Must provide either key or email if key is not provided in URL. |
email | string | yes * | Must provide either email or key if key is not provided in URL. |
Response
{
"status": 1
}
Response Code: 200 OK
Content-Type: application/json