Last updated: 3:11 PM - December 8, 2024
This object represents a customer of your business. Your customers are people who have either claimed a wallet pass from your account or have been integrated and implemented from one of your connected integrations.
- POST /v1/customers/create
- GET /v1/customers
- GET /v1/customers/:id
- PATCH /v1/customers/:id
- DELETE /v1/customers/:id
Unique identifier for the object (MongoDB ObjectID).
Customer's email address.
Customer's first name.
Customer's last name.
Apple Push Notification (APN) token for the customer.
Indicates if the customer holds a pass (can be a specific identifier or boolean).
The ID of the creator of this customer (likely another user or admin).
The total amount the customer has spent.
The status of the customer (e.g., active, inactive).
Additional metadata associated with the customer. Can contain key-value pairs for storing extra information.
Timestamp when the customer object was created (Unix timestamp).
Timestamp of the last update to the customer object (Unix timestamp).
Version number of the customer object, typically used for concurrency control.
{ "id": "670e8c20f5cc66995a0114d7", "email": "sipari9019@craftapk.com", "fname": "", "lname": "", "apn_push_token": "", "pass_holder": "", "creatorID": "670e8206f5cc66995a0114d5", "total_spent": 0, "status": "active", "metadata": { }, "created": 1729006624, "updated_at": 1729006624, "v": 1, }
Customer's email address.
The status of the customer, e.g., new, active, inactive.
A set of key-value pairs associated with the customer.
Customer's first name.
Customer's last name.
Apple Push Notification (APN) token for the customer.
Indicates whether the customer holds a pass.
Total amount the customer has spent.
Unix timestamp when the customer record was created.
Unix timestamp when the customer record was last updated.
Version number of the customer record.
curl --location 'https://api.gowithpush.com/v1/customers/create' -H 'Content-Type: application/json' -H 'X-API-Key: <YOUR-API-KEY>' -d '{ "email": "vacir36811@avashost.com", "status": "new", "metadata": {} }'
{ "customer": { "id": "67196766522eb67a9154e473", "email": "vicor@mac.com", "fname": "", "lname": "", "apn_push_token": "", "pass_holder": "", "creatorID": "662eacdd93c3237c5873dc20", "total_spent": 0, "status": "active", "metadata": {}, "created": 1729718118, "updated_at": 1729718118, "v": 1 }, "message": "Customer created successfully", "status": "success" }
The unique identifier of the customer to retrieve.
API Key for authenticating the request.
curl --location 'https://api.gowithpush.com/v1/customers/66cd471f5efb4a24dd3456f2' -H 'X-API-Key: <YOUR-API-KEY>'
{ "status": "success", "customer": { "id": "66cd471f5efb4a24dd3456f2", "email": "vacir36811@avashost.com", "fname": "", "lname": "", "apn_push_token": "", "pass_holder": "", "creatorID": "662eacdd93c3237c5873dc20", "total_spent": 0, "status": "active", "metadata": {}, "created": 1724729119, "updated_at": 1724729119, "v": 1 } }
The page number of the paginated results.
The number of results per page.
API Key for authenticating the request.
curl --location 'https://api.gowithpush.com/v1/customers?page=1&per_page=2' -H 'X-API-Key: <YOUR-API-KEY>'
{ "status": "success", "customers": [ { "id": "670e8c20f5cc66995a0114d7", "email": "sipari9019@craftapk.com", "fname": "", "lname": "", "apn_push_token": "", "pass_holder": "", "creatorID": "670e8206f5cc66995a0114d5", "total_spent": 0, "status": "active", "metadata": {}, "created": 1729006624, "updated_at": 1729006624, "v": 1 }, { "id": "670e8c20f5cc66995a0114d8", "email": "vacir36811@avashost.com", "fname": "John", "lname": "Doe", "apn_push_token": "some_token", "pass_holder": "yes", "creatorID": "670e8206f5cc66995a0114d5", "total_spent": 100, "status": "inactive", "metadata": {}, "created": 1729006625, "updated_at": 1729006625, "v": 1 } ], "page": 1, "per_page": 2, "total": 2 }
The unique ID of the customer to be updated.
The ID of the user making the update request.
API Key for authenticating the request.
The email address of the customer.
The first name of the customer.
The last name of the customer.
The status of the customer (e.g., active, inactive).
A set of key-value pairs associated with the customer.
curl -L -X PATCH 'https://api.gowithpush.com/2024-10/customers/66cd471f5efb4a24dd3456f2' -H 'userID: 66abe34930ac8b1edfd40a96' -H 'Content-Type: application/json' -H 'X-API-Key: <YOUR-API-KEY>' --data-raw '{ "email": "vacir36811@avashost.com", "fname": "Hello", "lname": "There", "status": "active", "metadata": {} }'
{ "customer": { "id": "66cd471f5efb4a24dd3456f2", "email": "vacir36811@avashost.com", "fname": "Hello", "lname": "There", "apn_push_token": "", "pass_holder": "", "creatorID": "662eacdd93c3237c5873dc20", "total_spent": 0, "status": "active", "metadata": {}, "created": 1724729119, "updated_at": 1729717316, "v": 1 }, "status": "success" }
The unique ID of the customer to be deleted.
API Key for authenticating the request.
curl -L -X DELETE 'https://api.gowithpush.com/2024-10/customers/67196766522eb67a9154e473' -H 'X-API-Key: <YOUR-API-KEY>'
{ "id": "67196766522eb67a9154e473", "isDeleted": false, "message": "Customer not found", "status": "error" }