Getting Started With DailyMails API¶
Introduction¶
Welcome, this is the DailyMails API documentation. A guide to how you can use, interact with the Dailymails API.
You can use the DailyMails API to programmatically manage records and perform actions on DailyMails using conventional HTTP requests. The API endpoints are easy to use and are highly responsive, making it simple and effective to fetch information and to execute actions.
Various actions like creating, deleting, updating etc.. that are generally performed using the dailymails portal and API; enabling you to script actions to execute them dynamically and automatically, as your situations and demand.
This API documentation starts with an overview of the implementation and then proceeds with the detailed information and example uses of various endpoints.
Requests¶
Method |
Usage |
---|---|
GET |
GET method can be used to get information regarding your account;
GET method returns information in JSON format. The attributes available in
the JSON can be used to create any additional requests.
All the requests made using GET method get information and are read-only;
and, they do not perform any action on the objects you are querying.
|
DELETE |
DELETE method can be used to terminate, remove, or to delete a resource
in your Account. This request will remove the particular object if found
in your Account. If not found, the request returns the message that the
object was not found. That is, you do not have to query that whether an object
is available before using a DELETE method; and, regardless of the availability,
the final state after executing a successful request will be the same.
|
PUT |
PUT method can be used to update information regarding a resource or object
available in your Account.
PUT method updates the information of the resource regardless of the existing
values; and, requests made using the PUT method will not check the existing
attributes of the resource.
|
POST |
POST method can be used to create a new resource or object or in your Account;
for example, creating new Records, etc.
A request using POST method contains all the necessary attributes required
to create a new resource or object.
|
Http Status Code¶
Along responding to the HTTP methods, the API also returns standard HTTP statuses and error codes.
If there is a problem with any request, the HTTP status will show the error code and the body of the response will have more details regarding the issue encountered.
Below are the common HTTP status codes and their interpretation:
200 - the request fulfilled successfully and no error occurred.
400 - the status codes in the 400 series indicate some sort of problem with the request: a malformed request, unauthorized attempt, authentication failure, etc.
500 - the status codes in the 500 series indicate a server-side problem, typically some issue with the Dailymails API itself. And that the request cannot be fulfilled.
EXAMPLE ERROR RESPONSE
HTTP/1.1 403 Test
{
"id": "test",
"message": "You do not have access to attempted action."
}