Users

Users

Create an user

POST 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 Body

Name
Type
Description

document

string

User's legal ID

email

string

telephone

string

service_uid

string

User's External identifier

first_name

string

User's name

last_name

string

User's last name

birthdate

string

Format: yyyy-mm-dd

gender

string

Values: "F", "M"

street

string

Customer's address

postcode

string

city

string

department

string

state

string

country

string

Country's ISO 3166-1 alpha-3 code

document_type

string

User's legal ID type

marital_status

string

Values: "single", "commited", "married", "divorced", "widowed".

tags

string

Comma separated tags, ex: tag1, tag2, tag3.

points

integer

User's points.

mailing_enabled

string

The user can or can't receive emails. Values: "enabled", "disabled".

mailing_disabled_reason

string

Reason why the user can't receive emails. Values: "bounce", "unsubscribe", "spamreport", "dropped", "other".

whatsapp_enabled

string

The user can or can't receive Whatsapp. Values: "enabled", "disabled".

whatsapp_disabled_reason

string

Reason why the user can't receive Whatsapp. Values: "bounce", "unsubscribe", "spamreport", "dropped", "other".

sms_enabled

string

The user can or can't receive text messages. Values: "enabled", "disabled".

sms_disabled_reason

string

Reason why the user can't receive text messages. Values: "bounce", "unsubscribe", "spamreport", "dropped", "other".

club_inscription_date

string

custom_attributes

array

Key value pair with user's additional information. Definition of these attributes must be previosly created.

{
    "payload": {
        //user-body
    },
    "message": "",
    "code": "ok",
    "time": "XXms"
}

Example

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"

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"]
		},
		"whatsapp_enabled": {
			"type": "string",
			"enum": ["enabled", "disabled"]
		},
		"whatsapp_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"]
		},
		"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,
        "whatsapp_enabled": true,
        "whatsapp_enabled_reason": null,
        "sms_enabled": true,
        "sms_enabled_reason": 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"
}

Find an user (multi-id)

GET 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.

Query Parameters

Name
Type
Description

document

string

email

string

telephone

string

service_uid

string

{
    "payload": {
        // User array
    },
    "message": "ok",
    "code": "ok",
    "time": "XXms"
}

Example

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'

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,
        "whatsapp_enabled": true,
        "whatsapp_enabled_reason": null,
        "sms_enabled": true,
        "sms_enabled_reason": 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"
}

Find an user by service_uid (DEPRECATED)

GET https://api.woowup.com/apiv3/users/{id}

Return an user by id or Base64 encoded service_uid.

Path Parameters

Name
Type
Description

id

string

User ID or Base64 encoded service_uid

Example

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
"

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,
        "whatsapp_enabled": true,
        "whatsapp_enabled_reason": null,
        "sms_enabled": true,
        "sms_enabled_reason": 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"
}

GET https://api.woowup.com/apiv3/multiusers/exist

Find out whether an user exists or not searching by service_uid, document and/or email.

Query Parameters

Name
Type
Description

document

string

User's legal ID

email

string

User's email

telephone

string

User's telephone

service_uid

string

User's external identifier

Example

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'

Response

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

User exist by ID (DEPRECATED)

GET https://api.woowup.com/apiv3/users/{id}/exist

Test if an user exists by id or encoded service_uid

Path Parameters

Name
Type
Description

id

string

User ID or encoded service_uid

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"
}

User belongs to segment

GET https://api.woowup.com/apiv3/users/{id}/belongsToSegment

Test if an user belongs to a segment.

Path Parameters

Name
Type
Description

id

string

User ID or encoded service_uid

Query Parameters

Name
Type
Description

segment_id

string

Segment id

Response

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

Update an user

PUT 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 Body

Name
Type
Description

document

string

User's legal ID

email

string

telephone

string

service_uid

string

User's external identifier

first_name

string

User's name

last_name

string

User's last name

birthdate

string

Format: yyyy-mm-dd

gender

string

Values: "F", "M"

street

string

Customer's address

postcode

string

city

string

department

string

state

string

country

string

Country's ISO 3166-1 alpha-3 code

document_type

string

User's legal ID type

marital_status

string

Values: "single", "commited", "married", "divorced", "widowed".

tags

string

Comma separated tags, ex: tag1, tag2, tag3.

points

integer

User's points.

mailing_enabled

string

The user can or can't receive emails. Values: "enabled", "disabled".

mailing_disabled_reason

string

Reason why the user can't receive emails. Values: "bounce", "unsubscribe", "spamreport", "dropped", "other".

whatsapp_enabled

string

The user can or can't receive Whatsapp. Values: "enabled", "disabled".

whatsapp_disabled_reason

string

Reason why the user can't receive Whatsapp. Values: "bounce", "unsubscribe", "spamreport", "dropped", "other".

sms_enabled

string

The user can or can't receive text messages. Values: "enabled", "disabled".

sms_disabled_reason

string

Reason why the user can't receive text messages. Values: "bounce", "unsubscribe", "spamreport", "dropped", "other".

club_inscription_date

string

custom_attributes

array

Key value pair with user's additional information. Definition of these attributes must be previosly created.

Example

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"
}'

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,
        "whatsapp_enabled": true,
        "whatsapp_enabled_reason": null,
        "sms_enabled": true,
        "sms_enabled_reason": 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"
}

Update an user (DEPRECATED)

PUT https://api.woowup.com/apiv3/users/{id}

Update an existing user.

Path Parameters

Name
Type
Description

id

string

User ID or encoded service_uid

Request Body

Name
Type
Description

service_uid

string

Internal user ID

document

string

User's legal ID

email

string

telephone

string

first_name

string

User's name

last_name

string

User's last name

birthdate

string

Format: yyyy-mm-dd

gender

string

Values: "F", "M"

street

string

Customer's address

postcode

string

city

string

department

string

state

string

country

string

Country's ISO 3166-1 alpha-3 code

document_type

string

User's legal ID type

marital_status

string

Values: "single", "commited", "married", "divorced", "widowed".

tags

string

Comma separated tags, ex: tag1, tag2, tag3.

points

integer

User's points.

mailing_enabled

string

The user can or can't receive emails. Values: "enabled", "disabled".

mailing_disabled_reason

string

Reason why the user can't receive emails. Values: "bounce", "unsubscribe", "spamreport", "dropped", "other".

custom_attributes

array

Key value pair with user's additional information. Definition of these attributes must be previosly created.

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 an user

DELETE https://api.woowup.com/apiv3/multiusers

Delete an user

Request Body

Name
Type
Description

document

string

email

string

telephone

string

service_uid

string

User's external identifier

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