Users

Users

post
Create an user

https://api.woowup.com/apiv3/users
Create an user. At least one of the parameters marked as required is mandatory for a successfull request. For example, you can create an user with only document or only email, or both at the same time.
Request
Response
Request
Body Parameters
document
required
string
User's legal ID
email
required
string
telephone
required
string
service_uid
required
string
User's External identifier
first_name
optional
string
User's name
last_name
optional
string
User's last name
birthdate
optional
string
Format: yyyy-mm-dd
gender
optional
string
Values: "F", "M"
street
optional
string
Customer's address
postcode
optional
string
city
optional
string
department
optional
string
state
optional
string
country
optional
string
Country's ISO 3166-1 alpha-3 code
document_type
optional
string
User's legal ID type
marital_status
optional
string
Values: "single", "commited", "married", "divorced", "widowed".
tags
optional
string
Comma separated tags, ex: tag1, tag2, tag3.
points
optional
integer
User's points.
mailing_enabled
optional
string
The user can or can't receive emails. Values: "enabled", "disabled".
mailing_disabled_reason
optional
string
Reason why the user can't receive emails. Values: "bounce", "unsubscribe", "spamreport", "dropped", "other".
whatsapp_phone
optional
string
sms_enabled
optional
string
The user can or can't receive text messages. Values: "enabled", "disabled".
sms_disabled_reason
optional
string
Reason why the user can't receive text messages. Values: "bounce", "unsubscribe", "spamreport", "dropped", "other".
club_inscription_date
optional
string
custom_attributes
optional
array
Key value pair with user's additional information. Definition of these attributes must be previosly created.
Response
200: OK
Request successful
{
"payload": {
//user-body
},
"message": "",
"code": "ok",
"time": "XXms"
}
400: Bad Request
Invalid parameters. View message for more details
{
"payload": {
"errors": [
"first_error_message",
"second_error_message"
]
},
"message": "bad request",
"code": "bad_request",
"time": "XXms"
}
429: Too Many Requests
API's request-per-second limit exceeded
500: Internal Server Error
Unexpected error
{
"payload": [],
"message":"some_message",
"code": "internal_error",
"time": "XXms"
}

Example

Bash
PHP
python3
Bash
curl -X POST \
-H "Accept: application/json" \
-H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-d '{"email": "test@email.com", "first_name": "John", "last_name": "Doe", "country" : "USA"}' "https://api.woowup.com/apiv3/users"
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.woowup.com/apiv3/users');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"email\": \"test@email.com\", \"first_name\": \"John\", \"last_name\": \"Doe\", \"country\" : \"USA\"}");
$headers = array();
$headers[] = 'Accept: application/json';
$headers[] = 'Authorization: Basic '.$apikey;
$headers[] = 'Content-Type: application/json';
$headers[] = 'Cache-Control: no-cache';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
python3
import requests #pip install requests
url = "https://api.woowup.com/apiv3/users"
payload = "{\"email\": \"test@email.com\", \"first_name\": \"John\", \"last_name\": \"Doe\", \"country\" : \"USA\"}"
headers = {
'Accept': "application/json",
'Authorization': "Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
'Content-Type': "application/json",
'Cache-Control': "no-cache",
'cache-control': "no-cache"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)

Json Schema

{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A representation of a user",
"type": "object",
"anyOf": [{
"required": ["service_uid"]
},{
"required": ["email"]
},{
"required": ["document"]
},{
"required": ["telephone"]
}
],
"properties": {
"service_uid": {"type": ["string", "null"]},
"email": {"type": "string", "format": "email"},
"first_name": {"type": "string"},
"last_name": {"type": "string"},
"telephone": {"type": "string"},
"birthdate": {"type": "string"},
"gender": {"type": "string", "pattern": "^[fFmM]{0,1}$"},
"street": {"type": "string"},
"address": {"type": "string"},
"city": {"type": "string"},
"state": {"type": "string"},
"department": {"type": "string"},
"country": {"type": "string"},
"document": {"type": "string"},
"document_type": {"type": "string"},
"marital_status": {
"type": "string",
"enum": ["single", "commited", "married", "divorced", "widowed"]
},
"postcode": {"type": "string"},
"tags": {"type": "string"},
"points": {"type": "integer"},
"custom_attributes": {"type": "object"},
"mailing_enabled": {
"type": "string",
"enum": ["enabled", "disabled"]
},
"mailing_disabled_reason": {
"type": "string",
"enum": ["bounce", "unsubscribe", "spamreport", "dropped", "other"]
},
"sms_enabled": {
"type": "string",
"enum": ["enabled", "disabled"]
},
"sms_disabled_reason": {
"type": "string",
"enum": ["bounce", "unsubscribe", "spamreport", "dropped", "other"]
},
"whatsapp_phone": {"type": "string", "maxLength": 50},
"club_inscription_date": {"type": "string"}
}
}

Example

This is a valid json due to previous json schema

{
"email": "test@email.com",
"first_name": "John",
"last_name": "Doe",
"country": "ARG",
"custom_attributes": {
"fecha_casamiento": "2017-08-03 14:00:00",
"cantidad_autos": 2,
"nombre_mascota": "Chuky",
"edad_mascota": 5,
"peso_mascota": 20.3,
"vacunas_mascota": ["parvovirus", "moquillo", "hepatitis"]
}
}

Response

{
"payload": {
"userapp_id": XXXXXXXX,
"user_id": YYYYYYYY,
"app_id": ZZZ,
"service_uid": null,
"email": "test@email.com",
"first_name": "John",
"last_name": "Doe",
"telephone": null,
"birthday": null,
"gender": null,
"document": null,
"document_type": null,
"state": null,
"city": null,
"department": null,
"address": null,
"postal_code": null,
"marital_status": null,
"tags": null,
"points": 0,
"customform": [],
"club_inscription_date": null,
"blocked": false,
"notes": null,
"mailing_enabled": true,
"mailing_enabled_reason": null,
"sms_enabled": true,
"sms_enabled_reason": null,
"whatsapp_phone": null,
"custom_attributes": {
"fecha_casamiento": "2017-08-03 14:00:00",
"cantidad_autos": 2,
"nombre_mascota": "Chuky",
"edad_mascota": 5,
"peso_mascota": 20.3,
"vacunas_mascota": ["parvovirus", "moquillo", "hepatitis"]
},
"family": [],
"createtime": "2019-02-01T21:26:18+00:00",
"updatetime": null
},
"message": "",
"code": "ok",
"time": "28ms"
}

get
List users

https://api.woowup.com/users
Search users by criteria
Request
Response
Request
Query Parameters
limit
optional
integer
Items per page returned. Default = 25, max = 100
page
optional
integer
Number of page. First page is 0
include
optional
string
Filter's definition in JSON format
exclude
optional
string
Filter's definition in JSON format
search
optional
string
Free text to find in email, first name, last name, uid, etc.
Response
200: OK
Request successful
400: Bad Request
Invalid JSON. Malformed JSON in 'include' or 'exclude' parameters
429: Too Many Requests
API's request-per-second limit exceeded
500: Internal Server Error
Unexpected error

Example

Bash
PHP
python3
Bash
curl -X GET \
-H 'accept: application/json' \
-H 'authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-H 'cache-control: no-cache' \
'https://api.woowup.com/apiv3/users?search=juan&limit=50&page=0'
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.woowup.com/apiv3/users?search=juan&limit=50&page=0",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"accept: application/json",
"authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"cache-control: no-cache,no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
python3
import requests # pip install requests
url = "https://api.woowup.com/apiv3/users"
querystring = {"search":"juan","limit":"50","page":"0"}
headers = {
'accept': "application/json",
'authorization': "Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
'cache-control': "no-cache,no-cache"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)

Response

{
"payload": [{
"userapp_id": 1111111,
"user_id": 222222,
"app_id": 123,
"service_uid": "user1@email.com",
"email": "user1@email.com",
"first_name": "Juan Miguel",
"last_name": "Velez",
"document": "34567890",
"telephone": "1234-5678",
"birthday": "1999-07-06",
"gender": "M",
"state": "Some State",
"city": "Some City",
"street": "Some street",
"postal_code": "12345",
"tags": ['tag1', 'tag2'],
"points": 494,
"customform": [
],
"family":[],
"createtime": "2016-10-03T17:10:25+00:00",
"updatetime": "2018-02-01T14:15:40+00:00"
},
{
"userapp_id": 333333,
"user_id": 444444,
"app_id": 123,
"service_uid": "user2@email.com",
"email": "user2@email.com",
"first_name": "juana manuela",
"last_name": "carbajal",
"document": "23456789",
"telephone": "1234-5678",
"birthday": "1998-02-11",
"gender": "F",
"state": "Some State",
"city": "Some City",
"street": "Some street",
"postal_code": "12345",
"tags": null,
"points": 0,
"customform": [
],
"family": [
{
"first_name": "josefina",
"last_name": "sanchez",
"relationship": "son",
"birthdate": "2008-11-13",
"gender": "F",
"email": "email03@example.com",
"uid": "123456789",
"telephone": "5555-6666",
"address": "Some Address 123"
},
{
"first_name": "jose",
"last_name": "sanchez",
"relationship": "nephew",
"birthdate": "1999-02-22",
"gender": "M",
"email": "email04@example.com",
"uid": "123456788",
"telephone": "5555-7777",
"address": "Some Other Address 456"
}
],
"createtime": "2016-10-03T17:10:25+00:00",
"updatetime": "2018-02-01T14:15:40+00:00"
}],
"message":"ok",
"code":"ok",
"time":"100ms"
}

get
Find an user (multi-id)

https://api.woowup.com/apiv3/multiusers/find
Search and retrieve an user by different parameters: service_uid, document and email. The priority of searching can be arranged for each WoowUp account.
Request
Response
Request
Query Parameters
document
optional
string
email
optional
string
telephone
optional
string
service_uid
optional
string
Response
200: OK
User successfully found
{
"payload": {
// User array
},
"message": "ok",
"code": "ok",
"time": "XXms"
}
404: Not Found
User not found
{
"payload": [],
"message": "User not found",
"code": "user_not_found",
"time": "6ms"
}
429: Too Many Requests
API's request-per-second limit exceeded

Example

Bash
PHP
python3
Bash
curl -X GET \
'https://api.woowup.com/apiv3/multiusers/find?email=test@email.com' \
-H 'Accept: application/json' \
-H 'Authorization: Basic xxxxxxxxxxxxxxxxx' \
-H 'Content-Type: application/json'
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.woowup.com/apiv3/multiusers/find?email=test@email.com",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Accept: application/json",
"Authorization: Basic xxxxxxxxxxxxxxxxx",
"Content-Type: application/json",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
python3
import requests # pip install requests
url = "https://api.woowup.com/apiv3/multiusers/find"
querystring = {"email":"test@email.com"}
headers = {
'Accept': "application/json",
'Authorization': "Basic xxxxxxxxxxxxxxxxx",
'Content-Type': "application/json",
'cache-control': "no-cache"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)

Response

{
"payload": {
"userapp_id": 31173442,
"user_id": 31157866,
"app_id": 938,
"service_uid": null,
"email": "test@email.com",
"first_name": "John",
"last_name": "Doe",
"telephone": null,
"birthday": null,
"gender": null,
"document": null,
"document_type": null,
"state": null,
"city": null,
"department": null,
"address": null,
"postal_code": null,
"marital_status": null,
"tags": null,
"points": 0,
"customform": [],
"club_inscription_date": null,
"blocked": false,
"notes": null,
"mailing_enabled": true,
"mailing_enabled_reason": null,
"sms_enabled": true,
"sms_enabled_reason": null,
"whatsapp_phone": null,
"custom_attributes": [],
"family": [],
"createtime": "2019-02-01T21:26:18+00:00",
"updatetime": "2019-02-01T21:26:18+00:00"
},
"message": "ok",
"code": "ok",
"time": "49ms"
}

get
Find an user by service_uid (DEPRECATED)

https://api.woowup.com/apiv3/users/{id}
Return an user by id or Base64 encoded service_uid.
Request
Response
Request
Path Parameters
id
required
string
User ID or Base64 encoded service_uid
Response
200: OK
Request successful
404: Not Found
Unknown user
429: Too Many Requests
API's request-per-second limit exceeded
500: Internal Server Error
Unexpected error

Example

Bash
PHP
python3
Bash
curl -X GET \
-H "Accept: application/json" \
-H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cache-Control: no-cache" \
"https://api.woowup.com "
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.woowup.com",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Accept: application/json",
"Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Cache-Control: no-cache",
"Content-Type: application/x-www-form-urlencoded",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
python3
import requests # pip install requests
url = "https://api.woowup.com"
headers = {
'Accept': "application/json",
'Authorization': "Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
'Content-Type': "application/x-www-form-urlencoded",
'Cache-Control': "no-cache",
'cache-control': "no-cache"
}
response = requests.request("GET", url, headers=headers)
print(response.text)

Response

{
"payload": {
"userapp_id": 2207258,
"user_id": 2192714,
"app_id": 123,
"service_uid": "user_2192714@email.com",
"email": "user_2192714@email.com",
"first_name": "first name",
"last_name": "last name",
"telephone": "+1 123 4567 890",
"birthday": "1989-06-22",
"gender": "M",
"state": "My state",
"city": "New City",
"street": "The Street",
"postal_code": "12345",
"points": 50,
"points_pending": 12,
"customform": {
"dni": "123456789"
},
"club_inscription_date": "2017-01-22 18:26:16",
"blocked": false,
"notes": "is a good customer",
"mailing_enabled": true,
"mailing_enabled_reason": null,
"sms_enabled": true,
"sms_enabled_reason": null,
"whatsapp_phone": null,
"family": [
{
"first_name": "josefina",
"last_name": "sanchez",
"relationship": "son",
"birthdate": "2008-11-13",
"gender": "F",
"email": "email03@example.com",
"uid": "123456789",
"telephone": "5555-6666",
"address": "Some Address 123"
},
{
"first_name": "jose",
"last_name": "sanchez",
"relationship": "nephew",
"birthdate": "1999-02-22",
"gender": "M",
"email": "email04@example.com",
"uid": "123456788",
"telephone": "5555-7777",
"address": "Some Other Address 456"
}
],
"createtime": "2016-10-03T17:10:25+00:00",
"updatetime": "2018-02-01T14:15:40+00:00"
},
"message":"ok",
"code":"ok",
"time":"100ms"
}
https://api.woowup.com/apiv3/multiusers/exist
Find out whether an user exists or not searching by service_uid, document and/or email.
Request
Response
Request
Query Parameters
document
optional
string
User's legal ID
email
optional
string
User's email
telephone
optional
string
User's telephone
service_uid
optional
string
User's external identifier
Response
200: OK
Request successful
429: Too Many Requests
API's requests-per-second limit exceeded
500: Internal Server Error
Unexpected error

Example

Bash
PHP
python3
Bash
curl -X GET \
'https://api.woowup.com/apiv3/multiusers/exist?email=test@email.com' \
-H 'Accept: application/json' \
-H 'Authorization: Basic xxxxxxxxxx' \
-H 'Content-Type: application/json'
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.woowup.com/apiv3/multiusers/exist?email=test@email.com",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"Accept: application/json",
"Authorization: Basic xxxxxxxxxx",
"Content-Type: application/json",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
python3
import requests # pip install requests
url = "https://api.woowup.com/apiv3/multiusers/exist"
querystring = {"email":"test@email.com"}
headers = {
'Accept': "application/json",
'Authorization': "Basic xxxxxxxxxx",
'Content-Type': "application/json",
'cache-control': "no-cache"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)

Response

{
"payload": {
"exist": true,
"userapp_id": "31173442"
},
"message": "",
"code": "ok",
"time": "57ms"
}

get
User exist by ID (DEPRECATED)

https://api.woowup.com/apiv3/users/{id}/exist
Test if an user exists by id or encoded service_uid
Request
Response
Request
Path Parameters
id
optional
string
User ID or encoded service_uid
Response
200: OK
Request successful
429: Too Many Requests
API's requests-per-second limit exceeded
500: Internal Server Error
Unexpected error

Example

curl -X GET \
-H "Accept: application/json" \
-H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cache-Control: no-cache" \
"https://api.woowup.com/apiv3/users/12345/exist"

Response

{
"payload": {
"exist": true
},
"message":"ok",
"code":"ok",
"time":"100ms"
}

get
User belongs to segment

https://api.woowup.com/apiv3/users/{id}/belongsToSegment
Test if an user belongs to a segment.
Request
Response
Request
Path Parameters
id
required
string
User ID or encoded service_uid
Query Parameters
segment_id
required
string
Segment id
Response
200: OK
Request successful
400: Bad Request
Invalid parameters
404: Not Found
User not found
429: Too Many Requests
API's requests-per-second limit exceeded
500: Internal Server Error
Unexpected error

Response

{
"payload": {
"belongsToSegment": true
},
"message":"ok",
"code":"ok",
"time":"100ms"
}

put
Update an user

https://api.woowup.com/apiv3/multiusers
Update an existing user. At least one of the parameters marked as required is mandatory for a successful request
Request
Response
Request
Body Parameters
document
required
string
User's legal ID
email
required
string
telephone
required
string
service_uid
required
string
User's external identifier
first_name
optional
string
User's name
last_name
optional
string
User's last name
birthdate
optional
string
Format: yyyy-mm-dd
gender
optional
string
Values: "F", "M"
street
optional
string
Customer's address
postcode
optional
string
city
optional
string
department
optional
string
state
optional
string
country
optional
string
Country's ISO 3166-1 alpha-3 code
document_type
optional
string
User's legal ID type
marital_status
optional
string
Values: "single", "commited", "married", "divorced", "widowed".
tags
optional
string
Comma separated tags, ex: tag1, tag2, tag3.
points
optional
integer
User's points.
mailing_enabled
optional
string
The user can or can't receive emails. Values: "enabled", "disabled".
mailing_disabled_reason
optional
string
Reason why the user can't receive emails. Values: "bounce", "unsubscribe", "spamreport", "dropped", "other".
whatsapp_phone
optional
string
sms_enabled
optional
string
The user can or can't receive text messages. Values: "enabled", "disabled".
sms_disabled_reason
optional
string
Reason why the user can't receive text messages. Values: "bounce", "unsubscribe", "spamreport", "dropped", "other".
club_inscription_date
optional
string
custom_attributes
optional
array
Key value pair with user's additional information. Definition of these attributes must be previosly created.
Response
200: OK
400: Bad Request
404: Not Found
429: Too Many Requests
API's requests-per-second limit exceeded
500: Internal Server Error

Example

Bash
PHP
python3
Bash
curl -X PUT \
https://api.woowup.com/apiv3/multiusers \
-H 'Accept: application/json' \
-H 'Authorization: Basic xxxxxxxxxxxxxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"email": "test@email.com",
"first_name": "John",
"last_name": "Doe",
"state": "CABA",
"city": "Buenos Aires"
}'
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.woowup.com/apiv3/multiusers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "{\"email\": \"test@email.com\",\"first_name\": \"John\",\"last_name\": \"Doe\",\"state\": \"CABA\",\"city\": \"Buenos Aires\"}",
CURLOPT_HTTPHEADER => array(
"Accept: application/json",
"Authorization: Basic xxxxxxxxxxxxxxxxxxxx",
"Content-Type: application/json",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
python3
import requests # pip install requests
url = "https://api.woowup.com/apiv3/multiusers"
payload = "{\"email\": \"test@email.com\",\"first_name\": \"John\",\"last_name\": \"Doe\",\"state\": \"CABA\",\"city\": \"Buenos Aires\"}"
headers = {
'Accept': "application/json",
'Authorization': "Basic xxxxxxxxxxxxxxxxxxxx",
'Content-Type': "application/json",
'cache-control': "no-cache"
}
response = requests.request("PUT", url, data=payload, headers=headers)
print(response.text)

Response

{
"payload": {
"userapp_id": XXXXXXXX,
"user_id": YYYYYYYY,
"app_id": ZZZ,
"service_uid": null,
"email": "test@email.com",
"first_name": "John",
"last_name": "Doe",
"telephone": null,
"birthday": null,
"gender": null,
"document": null,
"document_type": null,
"state": "CABA",
"city": "Buenos Aires",
"department": null,
"address": null,
"postal_code": null,
"marital_status": null,
"tags": null,
"points": 0,
"customform": [],
"club_inscription_date": null,
"blocked": false,
"notes": null,
"mailing_enabled": true,
"mailing_enabled_reason": null,
"sms_enabled": true,
"sms_enabled_reason": null,
"whatsapp_phone": null,
"custom_attributes": [],
"family": [],
"createtime": "2019-02-01T21:26:18+00:00",
"updatetime": "2019-02-05T21:34:35+00:00"
},
"message": "ok",
"code": "ok",
"time": "50ms"
}

put
Update an user (DEPRECATED)

https://api.woowup.com/apiv3/users/{id}
Update an existing user.
Request
Response
Request
Path Parameters
id
optional
string
User ID or encoded service_uid
Body Parameters
service_uid
optional
string
Internal user ID
document
optional
string
User's legal ID
email
optional
string
telephone
optional
string
first_name
optional
string
User's name
last_name
optional
string
User's last name
birthdate
optional
string
Format: yyyy-mm-dd
gender
optional
string
Values: "F", "M"
street
optional
string
Customer's address
postcode
optional
string
city
optional
string
department
optional
string
state
optional
string
country
optional
string
Country's ISO 3166-1 alpha-3 code
document_type
optional
string
User's legal ID type
marital_status
optional
string
Values: "single", "commited", "married", "divorced", "widowed".
tags
optional
string
Comma separated tags, ex: tag1, tag2, tag3.
points
optional
integer
User's points.
mailing_enabled
optional
string
The user can or can't receive emails. Values: "enabled", "disabled".
mailing_disabled_reason
optional
string
Reason why the user can't receive emails. Values: "bounce", "unsubscribe", "spamreport", "dropped", "other".
custom_attributes
optional
array
Key value pair with user's additional information. Definition of these attributes must be previosly created.
Response
200: OK
400: Bad Request
404: Not Found
429: Too Many Requests
API's requests-per-second limit exceded
500: Internal Server Error

Example

curl -X PUT \
-H "Accept: application/json" \
-H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-H "Cache-Control: no-cache" \
-d '{"email": "test@gmail2.com", "service_uid": "test@gmail2.com", "gender": "F", "telephone": "123456789", "birthday": "1980-04-22"}' "https://api.woowup.com/apiv3/users/12345"

Response

{
"payload": {
"userapp_id": 2207258,
"user_id": 2192714,
"app_id": 123,
"service_uid": "user_2192714@email.com",
"email": "user_2192714@email.com",
"first_name": "first name",
"last_name": "last name",
"points": 50,
"customform": {
"dni": "123456789"
},
"custom_attributes": {
"dni": "123456789",
"fecha_casamiento": "2017-08-03 14:00:00",
"cantidad_autos": 2,
"nombre_mascota": "Chuky",
"edad_mascota": 5
}
},
"message":"ok",
"code":"ok",
"time":"100ms"
}

delete
Delete an user

https://api.woowup.com/apiv3/multiusers
Delete an user
Request
Response
Request
Body Parameters
document
optional
string
email
optional
string
telephone
optional
string
service_uid
optional
string
User's external identifier
Response
200: OK
{
"payload": [],
"message": "ok",
"code": "ok",
"time": "98ms"
}
400: Bad Request
{
"payload": {
"errors": [
"Failed matching any of the provided schemas."
]
},
"message": "bad request",
"code": "bad_request",
"time": "44ms"
}
403: Forbidden
{
"payload": [],
"message": "forbidden: authentication failed",
"code": "forbidden",
"time": "7ms"
}
404: Not Found
User not found
{
"payload": [],
"message": "User not found",
"code": "user_not_found",
"time": "72ms"
}
500: Internal Server Error
{
"payload": [],
"message": "",
"code": "internal_error",
"time": "72ms"
}

El borrado de usuarios puede tardar en verse reflejado en la plataforma.

optional / required body parameters depend on multi-id settings

Example

Bash
PHP
python3
Bash
curl -X DELETE \
https://api.woowup.com/apiv3/multiusers \
-H 'Accept: application/json' \
-H 'Authorization: Basic XXXXXXXXXXXXXXXXXXXX' \
-H 'Content-Type: application/json' \
-d '{
"email": "test@email.com",
"document": "987654321"
}'
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.woowup.com/apiv3/multiusers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => "{\"email\": \"test@email.com\",\"document\": \"987654321\"}",
CURLOPT_HTTPHEADER => array(
"Accept: application/json",
"Authorization: Basic XXXXXXXXXXXXXXXXXXXX",
"Content-Type: application/json",
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
python3
import requests # pip install requests
url = "https://api.woowup.com/apiv3/multiusers"
payload = "{\"email\": \"test@email.com\",\"document\": \"987654321\"}"
headers = {
'Accept': "application/json",
'Authorization': "Basic XXXXXXXXXXXXXXXXXXXX",
'Content-Type': "application/json",
'cache-control': "no-cache"
}
response = requests.request("DELETE", url, data=payload, headers=headers)
print(response.text)

Response

{
"payload": [],
"message": "ok",
"code": "ok",
"time": "98ms"
}

delete
Delete users by segment

https://api.woowup.com/apiv3/multiusers/bulk
Delete users by segment
Request
Response
Request
Body Parameters
segment_id
required
number
notify_to
optional
string
email to receive the confirmation
Response
200: OK
will be receive an email when the deletion process is finished
{
"payload": {
"request_id": "XXX"
},
"message": "ok",
"code": "ok",
"time": "111ms"
}
400: Bad Request
//bad_request
{
"payload": {
"errors": [
"Required properties missing: [\"segment_id\"]"
]
},
"message": "bad request",
"code": "bad_request",
"time": "38ms"
}
//invalid_email
{
"payload": [],
"message": "Invalid email to notify",
"code": "invalid_email",
"time": "48ms"
}
403: Forbidden
{
"payload": [],
"message": "forbidden: authentication failed",
"code": "forbidden",
"time": "7ms"
}
404: Not Found
Segment not found