Imports
Imports are the primary way to load members into your organization over the API. You can import members in bulk by uploading a CSV file in the dashboard or by using the API directly.
The import model
The import object looks like the following json:
Properties
- Name
organization_id- Type
- string|Required
- Description
The identifier of the organization the import belongs to.
- Name
users- Type
- array[object]|Required
- Description
An array of user objects.
- Name
user- Type
- object
- Description
{ "email": "The users email address (Required)", "brand_id": "The brand id the user should be added to (Required)", "name": "The users name (Required)", "points": "The amount of points the user should receive - must be an integer (Required)", "storecard": "The identifier of the storecard the user should get (Optional - defaults to organization's first storecard)", "phone_number": "The users phone number (Optional)", "birthday": "The users birthday in YYYY-MM-DD format (Optional)", "licenseplate": "The users licenseplate (Optional)", "start_date": "The start date of the users membership in YYYY-MM-DD format (Optional)", "expires_at": "The date the membership expires in YYYY-MM-DD format (Optional)", "external_reference": "The external reference of the user (Optional)", "tag_id": "The identifier of the tag the user should be added to (Optional)", "location_id": "The external_id of the location that should be set as the users favorite location (Optional)", "welcome_mail": "If the user should receive a welcome email - 0 or 1 (Optional, defaults to 0)", "update_mail": "If the user should receive an update mail - 0 or 1 (Optional, defaults to 0)", }
Import members
This endpoint allows you to import a list of members. Max up to 2000 members per request.
Required headers
- Name
Authorization- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
import- Type
- string
- Description
The scope required to access this endpoint.
Request body
- Name
organization_id- Type
- string|Required
- Description
The identifier of the organization.
- Name
users- Type
- array[object]|Required
- Description
An array of user objects. Each user object must contain:
email,brand_id,name, andpoints(integer).
Note: The points field is required and must be an integer. Even if you don't want to give points, you must set it to 0.
Request
curl -X GET https://api.walletapp.co/v2/import \
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
- d '{
"organization_id": "<organization_id>",
"users": [
{
"email": "<email>",
"brand_id": "<brand_id>",
"name": "<name>",
"points": 1,
"storecard": "<storecard_id>",
"phone_number": "<phone_number>",
"licenseplate": "<licenseplate>",
"start_date": "<start_date>",
"expires_at": "<expiration_date>",
"external_reference": "<uuid>",
"tag_id": "<tag_id>",
"location_id": "<external_location_reference>",
"welcome_mail": 0,
"update_mail": 0
},
...
]
}'
Response
{
"import_id": "<uuid>",
"imported_members": 1
}
Get history
List when the members of brand last received points
Required headers
- Name
Authorization- Type
- string
- Description
The token itself as a bearer token.
Abilities
- Name
brand.import- Type
- string
- Description
The scope required to access this endpoint.
Request body
- Name
brand_id- Type
- string|Required
- Description
The brand id.
Request
curl -X GET https://api.walletapp.co/v2/import \
-H "Content-Type: application/json"
-H "Accept: application/json"
-H "Authorization: Bearer <your_token>"
- d '{
"brand_id": "<brand_id>",
}'
Response
{
"success": true,
"data": [
{
"email": "<email>",
"last_updated": "<timestamp|string>"
},
...
]
}
