Logo: Relish

  1. Sign in

Project: Core

Add new contacts to an existing user

URI Rest: /users/{user_id}/contacts

In order to manage user contacts

As API Consumer Developer

I'd like to add new contacts to an existing user

Scenarios
Successful add contact
Given
an user "user_id" with contacts into the agenda
And
"contacts_length" contacts
When
I request to add the contacts from "source"
Then
I receive a HTTP "NO_CONTENT"
And
the user will have "contacts_length" contacts
Examples:
source contacts_length user_id
FACEBOOK 9 1
AGENDA 5 2
GMAIL 4 3
OTHER 3 4
TWITTER 5 5
YAHOO 2 6
OUTLOOK 1 7
Successful add previously existing contact for a user without contacts
Given
an user "user_id" with contacts into the agenda
And
the users "existing_users"
When
I request to add the contacts from "source"
Then
I receive a HTTP "NO_CONTENT"
And
the user will have "final_length" contacts
And
no new users will be created
Examples:
source existing_users final_length user_id
FACEBOOK +34600005013_+34600005019_+34600005003_+34600002009 4 10
AGENDA +34600001005_+34600001018_+34600002011 3 11
Successful add previously existing contact form another source
Given
an user "user_id" with "existing_users" contacts into the agenda From "initial_source"
And
the users "existing_users"
When
I request to add the contacts from "source"
Then
I receive a HTTP "NO_CONTENT"
And
the user will have "final_length" contacts
And
no new users will be created
Examples:
source existing_users final_length user_id initial_source
FACEBOOK +34600004007_+34600004019_+34600005008_+34600005015 4 10 GMAIL
AGENDA +34600004020_+34600004008_+34600003019 3 11 FACEBOOK
Fail with invalid user
Given
an user "user_id" with contacts into the agenda
When
I call the Glass API contacts POST with errors
Then
the API will not add a new list of contacts linked to the user
Examples:
user_id
999999999

Last published almost 7 years ago by Raimundo Alegría.