Resources

API Root URL (Sandbox)

Use the following base URL when making requests to the sandbox environment:

https://api.sandbox.purplx.me

AppUser

The AppUser object represents a single PurplX end-user.

{
    "url": " https://api.sandbox.purplx.me/app-users/123456/",
    "id": 123456,
    "uuid": "07c09731-4d38-41f3-853b-7fd91a1aa840",
    "mobile_number": "+96170123456",
    "first_name": "Ahmad",
    "last_name": "Mohammad",
    "email": "[email protected]",
    "username": "+96170123456",
    "extra_data": {},
    "verifications": " https://api.sandbox.purplx.me/app-users/123456/verifications/",
    "transactions": " https://api.sandbox.purplx.me/app-users/123456/transactions/",
    "wallets": " https://api.sandbox.purplx.me/app-users/123456/wallets/",
    "verification-tokens": " https://api.sandbox.purplx.me/app-users/123456/verification-tokens/"
}

Fields

Name Type Desciption
url URL Read-only permanent address for this AppUser resource. Use this value if you need the URL of the AppUser resource, rather than building it programmatically.
id Integer Read-only unique integer ID of the AppUser.
uuid UUID Read-only unique UUID of the AppUser.
mobile_number E.164 PhoneNumber The mobile number of the AppUser.
first_name String First name
last_name String Last name
email EmailAddress Email address
username String Unique username of the AppUser.
extra_data JSON Object Arbitrary data attached to the AppUser.
verifications URL Read-only permanent address of the AppUser’s verifications.
transactions URL Read-only permanent address of the AppUser’s transactions.
wallets URL Read-only permanent address of the AppUser’s wallets.
verification-tokens URL Read-only permanent address for retrieving verification tokens for the AppUser.

Endpoints

Create an AppUser

POST /app-users/ Payload:

{
    "mobile_number": "e.164 phone number",
    "first_name": "string",
    "last_name": "string",
    "email": "email",
    "username": "string",   // A unique username for the AppUser.
    "password": "string",   // The passwords.
    "confirm_password": "string",
    "extra_data": "object"  // An object with arbitrary fields that are related to the AppUser.
}

Example payload:

{
    "mobile_number": "+639453046616",
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "[email protected]",
    "username": "janedoe123",
    "password": "0000",
    "confirm_password": "0000",
    "extra_data": {
        "example_key": "example_value"
    }
}

Example response:

{
    "url": "http://localhost:8000/app-users/32547/",
    "id": 32547,
    "uuid": "e2f94cc6-df07-4599-913f-b50cb31691f4",
    "mobile_number": "+639453046616",
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "[email protected]",
    "username": "janedoe123",
    "extra_data": {
        "example_key": "example_value"
    },
    "verifications": " https://api.sandbox.purplx.me/app-users/32547/verifications/",
    "transactions": " https://api.sandbox.purplx.me/app-users/32547/transactions/",
    "wallets": " https://api.sandbox.purplx.me/app-users/32547/wallets/",
    "verification-tokens": " https://api.sandbox.purplx.me/app-users/32547/verification-tokens/"
}

List AppUsers

GET /app-users/

Query parameters

Name Description
search General search
id
uuid
partner_id
first_name__icontains
last_name__icontains
email__icontains
phone_number__icontains
username
status__iexact
status__isnot
wallets__wallet_type_id__in Comma-separated values, e.g. 1,2,3
datetime_created__gte
datetime_created__lte

Example response: