Skip to content
v1.0.0
OAS 3.1.0

Paymenter

API documentation for Paymenter
Requires Paymenter v1.2.0 or higher.

Server:
Client Libraries

Affiliates

List Affiliates

Query Parameters
  • sort
    Type: string

    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.

  • include
    Type: string

    Available includes are user, userCount, userExists, orders, ordersCount, ordersExists. You can include multiple options by separating them with a comma.

  • per_page
    Type: integer
    default: 
    15

    How many items to show per page.

  • page
    Type: integer

    Which page to show.

  • filter[affiliate_id]
    Type: string
  • filter[code]
    Type: string
  • filter[visitors]
    Type: string
  • filter[reward]
    Type: string
  • filter[discount]
    Type: string
Responses
Request Example for get/v1/admin/affiliates
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"
          }
        }
      }
    }
  ]
}

Create a new affiliate

Body
required
application/json
  • code
    Type: string
    max length:  
    255
    required
  • user_id
    Type: integer
    required

    Integer numbers.

  • enabled
    Type: boolean | null
  • reward
    Type: number | null
    min:  
    0
    max:  
    100
Responses
Request Example for post/v1/admin/affiliates
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"
        }
      }
    }
  }
}

Show a specific affiliate

Path Parameters
  • affiliate
    Type: integer
    required

    The affiliate ID

Query Parameters
  • include
    Type: string

    Available includes are user, userCount, userExists, orders, ordersCount, ordersExists. You can include multiple options by separating them with a comma.

Responses
Request Example for get/v1/admin/affiliates/{affiliate}
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"
        }
      }
    }
  }
}

Update a specific affiliate

Path Parameters
  • affiliate
    Type: integer
    required

    The affiliate ID

Body
application/json
  • code
    Type: string | null
    max length:  
    255
  • enabled
    Type: boolean | null
  • reward
    Type: number | null
    min:  
    0
    max:  
    100
  • user_id
    Type: integer | null
Responses
Request Example for put/v1/admin/affiliates/{affiliate}
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"
        }
      }
    }
  }
}

Delete a specific affiliate

Path Parameters
  • affiliate
    Type: integer
    required

    The affiliate ID

Responses
  • 204

    No content

Request Example for delete/v1/admin/affiliates/{affiliate}
curl /v1/admin/affiliates/1 \
  --request DELETE
No Body

Models

Released under the MIT License.