Join our Ask A Trainer Sessions and Chat With our Experts!

Meaning of Status Code 201 in API Client.cs

SOLVED
Go to solution
user8038334
Campaign Collaborator
0 Votes

What is the meaning of Status Code 201?

 

var status_ = (int)response_.StatusCode;
if (status_ == 201)
{
var objectResponse_ = await ReadObjectResponseAsync<ContactList>(response_, headers_).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
}
return objectResponse_.Object;
}

2 ACCEPTED SOLUTIONS
user8038334
Campaign Collaborator
0 Votes

The HTTP Status Code 201 (Created) means that a request was successful and a new resource was created.

View solution in original post

Courtney_E
Moderator
0 Votes

Hello user8038334,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

201 is a success response code:

 

201: Created

Your request (usually a PUT or POST) to create a new resource was successful. The response body contains the new resource or a link to the new resource.

 

You can view a list of API response codes here:

 

Response Codes

https://v3.developer.constantcontact.com/api_guide/glossary_responses.html

 

Please have a look and let us know if you have any other questions!


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.

View solution in original post

2 REPLIES 2
user8038334
Campaign Collaborator
0 Votes

The HTTP Status Code 201 (Created) means that a request was successful and a new resource was created.

Courtney_E
Moderator
0 Votes

Hello user8038334,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

201 is a success response code:

 

201: Created

Your request (usually a PUT or POST) to create a new resource was successful. The response body contains the new resource or a link to the new resource.

 

You can view a list of API response codes here:

 

Response Codes

https://v3.developer.constantcontact.com/api_guide/glossary_responses.html

 

Please have a look and let us know if you have any other questions!


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Resources
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up