Paymenter
API documentation for Paymenter
Requires Paymenter v1.2.0 or higher.
API documentation for Paymenter
Requires Paymenter v1.2.0 or higher.
Available sorts are id, code, visitors, reward, discount, created_at. You can sort by multiple options by separating them with a comma. To sort in descending order, use - sign in front of the sort, for example: -id.
Available includes are user, userCount, userExists, orders, ordersCount, ordersExists. You can include multiple options by separating them with a comma.
How many items to show per page.
Which page to show.
curl '/v1/admin/affiliates?sort=&include=&per_page=20&page=2&filter%5Baffiliate_id%5D=&filter%5Bcode%5D=&filter%5Bvisitors%5D=&filter%5Breward%5D=&filter%5Bdiscount%5D='
{
"data": [
{
"id": "string",
"type": "string",
"attributes": {
"id": "string",
"code": "string",
"enabled": "string",
"visitors": "string",
"reward": "string",
"discount": "string",
"earnings": "string",
"updated_at": "string",
"created_at": "string"
},
"relationships": {
"user": {
"data": {
"type": "users",
"id": "string"
}
},
"orders": {
"data": {
"type": "string",
"id": "string"
}
}
}
}
],
"links": {
"first": "string",
"last": "string",
"prev": "string",
"next": "string"
},
"meta": {
"current_page": 1,
"from": null,
"path": null,
"per_page": 1,
"to": null
},
"included": [
{
"id": "string",
"type": "users",
"attributes": {
"id": 1,
"first_name": null,
"last_name": null,
"email": "string",
"email_verified_at": null,
"updated_at": null,
"created_at": null
},
"relationships": {
"properties": {
"data": [
{
"type": "properties",
"id": "string"
}
]
},
"orders": {
"data": [
{
"type": "orders",
"id": "string"
}
]
},
"services": {
"data": [
{
"type": "services",
"id": "string"
}
]
},
"invoices": {
"data": [
{
"type": "invoices",
"id": "string"
}
]
},
"tickets": {
"data": [
{
"type": "tickets",
"id": "string"
}
]
},
"credits": {
"data": [
{
"type": "credits",
"id": "string"
}
]
},
"role": {
"data": {
"type": "roles",
"id": "string"
}
}
}
}
]
}Return the affiliates as a JSON response
Paginated set of AffiliateResource
Integer numbers.
curl /v1/admin/affiliates \
--request POST \
--header 'Content-Type: application/json' \
--data '{
"user_id": 1,
"code": "",
"enabled": null,
"reward": null
}'
{
"data": {
"id": "string",
"type": "string",
"attributes": {
"id": "string",
"code": "string",
"enabled": "string",
"visitors": "string",
"reward": "string",
"discount": "string",
"earnings": "string",
"updated_at": "string",
"created_at": "string"
},
"relationships": {
"user": {
"data": {
"type": "users",
"id": "string"
}
},
"orders": {
"data": {
"type": "string",
"id": "string"
}
}
}
}
}Return the created affiliate as a JSON response
AffiliateResource
The affiliate ID
Available includes are user, userCount, userExists, orders, ordersCount, ordersExists. You can include multiple options by separating them with a comma.
curl '/v1/admin/affiliates/1?include='
{
"data": {
"id": "string",
"type": "string",
"attributes": {
"id": "string",
"code": "string",
"enabled": "string",
"visitors": "string",
"reward": "string",
"discount": "string",
"earnings": "string",
"updated_at": "string",
"created_at": "string"
},
"relationships": {
"user": {
"data": {
"type": "users",
"id": "string"
}
},
"orders": {
"data": {
"type": "string",
"id": "string"
}
}
}
}
}Return the affiliate as a JSON response
AffiliateResource
The affiliate ID
curl /v1/admin/affiliates/1 \
--request PUT \
--header 'Content-Type: application/json' \
--data '{
"user_id": null,
"code": null,
"enabled": null,
"reward": null
}'
{
"data": {
"id": "string",
"type": "string",
"attributes": {
"id": "string",
"code": "string",
"enabled": "string",
"visitors": "string",
"reward": "string",
"discount": "string",
"earnings": "string",
"updated_at": "string",
"created_at": "string"
},
"relationships": {
"user": {
"data": {
"type": "users",
"id": "string"
}
},
"orders": {
"data": {
"type": "string",
"id": "string"
}
}
}
}
}Return the updated affiliate as a JSON response
AffiliateResource
The affiliate ID
No content
curl /v1/admin/affiliates/1 \
--request DELETE
No content