Api

Customers

The Customers API will be used to get, create, update and delete information of customers.

Get Customers List

Request Method : GET

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/customers/?api_key={api_key}

Parameters

Name

Type

Description

Required

api
String
The api key of your account
True

Curl

curl --location --request GET 'https://payinvoice.dailymails.org/mysite/api/v1/customers/?api_key=your_api_key'

Java

 OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/customers/?api_key=your_api_key")
  .method("GET", null)
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/customers/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setBody('');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/customers/?api_key=your_api_key"

payload={}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'payinvoice.dailymails.org',
  'path': '/mysite/api/v1/customers/?api_key=your_api_key',
  'headers': {
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();

Delete Customers

Request Method : DELETE

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key={api_key}

Parameters

Name

Type

Description

Required

api_key
String
The api key of your account
True
id
String
Customer id which will be delete
True

Curl

curl --location --request DELETE 'https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key=your_api_key'

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key=your_api_key")
  .method("DELETE", body)
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_DELETE);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setBody('');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests
url = "https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key=your_api_key"

payload={}
headers = {
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
 var fs = require('fs');

 var options = {
   'method': 'DELETE',
   'hostname': 'payinvoice.dailymails.org',
   'path': '/mysite/api/v1/customers/{id}/?api_key=your_api_key',
   'maxRedirects': 20
 };

 var req = https.request(options, function (res) {
   var chunks = [];

   res.on("data", function (chunk) {
     chunks.push(chunk);
   });

   res.on("end", function (chunk) {
     var body = Buffer.concat(chunks);
     console.log(body.toString());
   });

   res.on("error", function (error) {
     console.error(error);
   });
 });

 req.end();

Customer Details

Request Method : GET

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key={api_key}

Parameters

NAME

Type

Description

Required

api_key
String
The api key of your account
True
id
String
Customer id of your account
True

Api Results

Name

Result

status
success|fail
id
Re-direct to api url.
error
(if status was fail) describes why the query failed,
Customer id is not correct.
User authentication failed. Wrong API Key.

Curl

curl --location --request GET 'https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key=your_api_key'

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key=your_api_key")
  .method("GET", null)
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setBody('');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key=your_api_key"

payload={}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'payinvoice.dailymails.org',
  'path': '/mysite/api/v1/customers/{id}/?api_key=your_api_key',
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();

Create Customers

Request Method : POST

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/customers/?api_key={api_key}

Content-Type : application/json

Parameters

Name

Type

Description

Required

Customer type
String
Select customer type
True
First name
String
Enter First name
False
Last name
String
Enter Last name
False
Company name
String
Enter the Company name
False
Email
String
Enter The Email
True
Phone
String
Select The Phone
False
Website
String
Enter The Website name
False
Billing state
String
Enter The Billing state
False
Billing city
String
Select Billing city
False
Billing zipcode
String
Select Billing zipcode
True
Billing address
String
Enter The Billing address
False
Currency
String
Select The Currency
False
Payment terms
String
Select Payment terms
False
Enable portal
String
Enable portal
False
Portal language
String
Select Portal language
False
Shipping state
String
Enter Shipping state
False
Shipping city
String
Enter Shipping city
False
Shipping zipcode
String
Enter The Shipping zipcode
False
Shipping address
String
Enter The Shipping address
False
Billing country
String
Select Billing country
False
Shipping country
String
Select The Shipping country
False

Api Results

Name

Result

status
success|fail
error
(if status was fail) describes why the query failed,
Required parameter missing or invalid.

Curl

  curl --location --request POST 'https://payinvoice.dailymails.org/mysite/api/v1/customers/?api_key=your_api_key' \
--header 'Content-Type: application/json' \
--header 'Cookie: csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7' \
--data-raw '{
        "customer_type": 2,
        "first_name": "User first name",
        "last_name": "User last name",
        "company_name": "Apple",
        "email": "ram@gmail.com",
        "phone": "09871233210",
        "website": "https://payinvoice.dailymails.org/",
        "billing_state": "Rajasthan",
        "billing_city": "jaipur",
        "billing_zipcode": null,
        "billing_address": "Ramgarh Mode",
        "currency": 3,
        "payment_terms": 1,
        "enable_portal": true,
        "portal_language": 0,
        "shipping_state": "RAJASTHAN",
        "shipping_city": "JAIPUR",
        "shipping_zipcode": "302020",
        "shipping_address": "RAJEEV COLONY",
        "billing_country": 115,
        "shipping_country": 115
    }'

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n        \"customer_type\": 2,\r\n        \"first_name\": \"User first name\",\r\n        \"last_name\": \"User last name\",\r\n        \"company_name\": \"Apple\",\r\n        \"email\": \"ram@gmail.com\",\r\n        \"phone\": \"09871233210\",\r\n        \"website\": \"https://payinvoice.dailymails.org/\",\r\n        \"billing_state\": \"Rajasthan\",\r\n        \"billing_city\": \"jaipur\",\r\n        \"billing_zipcode\": null,\r\n        \"billing_address\": \"Ramgarh Mode\",\r\n        \"currency\": 3,\r\n        \"payment_terms\": 1,\r\n        \"enable_portal\": true,\r\n        \"portal_language\": 0,\r\n        \"shipping_state\": \"RAJASTHAN\",\r\n        \"shipping_city\": \"JAIPUR\",\r\n        \"shipping_zipcode\": \"302020\",\r\n        \"shipping_address\": \"RAJEEV COLONY\",\r\n        \"billing_country\": 115,\r\n        \"shipping_country\": 115\r\n    }");
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/customers/?api_key=your_api_key")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Cookie", "csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7")
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/customers/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json',
  'Cookie' => 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
));
$request->setBody('{
\n        "customer_type": 2,
\n        "first_name": "User first name",
\n        "last_name": "User last name",
\n        "company_name": "Apple",
\n        "email": "ram@gmail.com",
\n        "phone": "09871233210",
\n        "website": "https://payinvoice.dailymails.org/",
\n        "billing_state": "Rajasthan",
\n        "billing_city": "jaipur",
\n        "billing_zipcode": null,
\n        "billing_address": "Ramgarh Mode",
\n        "currency": 3,
\n        "payment_terms": 1,
\n        "enable_portal": true,
\n        "portal_language": 0,
\n        "shipping_state": "RAJASTHAN",
\n        "shipping_city": "JAIPUR",
\n        "shipping_zipcode": "302020",
\n        "shipping_address": "RAJEEV COLONY",
\n        "billing_country": 115,
\n        "shipping_country": 115
\n    }');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/customers/?api_key=your_api_key"

payload="{\r\n        \"customer_type\": 2,\r\n        \"first_name\": \"User first name\",\r\n        \"last_name\": \"User last name\",\r\n        \"company_name\": \"Apple\",\r\n        \"email\": \"ram@gmail.com\",\r\n        \"phone\": \"09871233210\",\r\n        \"website\": \"https://payinvoice.dailymails.org/\",\r\n        \"billing_state\": \"Rajasthan\",\r\n        \"billing_city\": \"jaipur\",\r\n        \"billing_zipcode\": null,\r\n        \"billing_address\": \"Ramgarh Mode\",\r\n        \"currency\": 3,\r\n        \"payment_terms\": 1,\r\n        \"enable_portal\": true,\r\n        \"portal_language\": 0,\r\n        \"shipping_state\": \"RAJASTHAN\",\r\n        \"shipping_city\": \"JAIPUR\",\r\n        \"shipping_zipcode\": \"302020\",\r\n        \"shipping_address\": \"RAJEEV COLONY\",\r\n        \"billing_country\": 115,\r\n        \"shipping_country\": 115\r\n    }"
headers = {
  'Content-Type': 'application/json',
  'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'POST',
  'hostname': 'payinvoice.dailymails.org',
  'path': '/mysite/api/v1/customers/?api_key=your_api_key',
  'headers': {
    'Content-Type': 'application/json',
    'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({"customer_type":2,"first_name":"User first name","last_name":"User last name","company_name":"Apple","email":"ram@gmail.com","phone":"09871233210","website":"https://payinvoice.dailymails.org/","billing_state":"Rajasthan","billing_city":"jaipur","billing_zipcode":null,"billing_address":"Ramgarh Mode","currency":3,"payment_terms":1,"enable_portal":true,"portal_language":0,"shipping_state":"RAJASTHAN","shipping_city":"JAIPUR","shipping_zipcode":"302020","shipping_address":"RAJEEV COLONY","billing_country":115,"shipping_country":115});

req.write(postData);

req.end();

Update Customers

Request Method : PUT

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key={api_key}

Content-Type : application/json

Parameters

NAME

Type

Description

Required

api
String
The api key of your account
True
subject
String
The subject of your invoice parameter
True
message
String
The HTML content of your invoice message
True

Api Results

Name

Result

status
success|fail
message
Send|Queued
id
Re-direct to api url.
error
(if status was fail) describes why the query failed,
Request method is not correct.
Required parameter missing or invalid.
User authentication failed. Wrong API Key.

Curl

curl --location --request PUT 'https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key=your_api_key' \
--header 'Content-Type: application/json' \
--header 'Cookie: csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7' \
--data-raw '{
        "customer_type": 2,
        "first_name": "karan",
        "last_name": "Sharma",
        "company_name": "Apple",
        "email": "karan@gmail.com",
        "phone": "09871233960",
        "website": "https://payinvoice.dailymails.org/",
        "billing_state": "Rajasthan",
        "billing_city": "jaipur",
        "billing_zipcode": null,
        "billing_address": "Ramgarh Mode",
        "currency": 3,
        "payment_terms": 1,
        "enable_portal": true,
        "portal_language": 0,
        "shipping_state": "RAJASTHAN",
        "shipping_city": "JAIPUR",
        "shipping_zipcode": "302020",
        "shipping_address": "RAJEEV COLONY",
        "billing_country": 115,
        "shipping_country": 115
    }'

JAVA

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n        \"customer_type\": 2,\r\n        \"first_name\": \"karan\",\r\n        \"last_name\": \"Sharma\",\r\n        \"company_name\": \"Apple\",\r\n        \"email\": \"karan@gmail.com\",\r\n        \"phone\": \"09871233960\",\r\n        \"website\": \"https://payinvoice.dailymails.org/\",\r\n        \"billing_state\": \"Rajasthan\",\r\n        \"billing_city\": \"jaipur\",\r\n        \"billing_zipcode\": null,\r\n        \"billing_address\": \"Ramgarh Mode\",\r\n        \"currency\": 3,\r\n        \"payment_terms\": 1,\r\n        \"enable_portal\": true,\r\n        \"portal_language\": 0,\r\n        \"shipping_state\": \"RAJASTHAN\",\r\n        \"shipping_city\": \"JAIPUR\",\r\n        \"shipping_zipcode\": \"302020\",\r\n        \"shipping_address\": \"RAJEEV COLONY\",\r\n        \"billing_country\": 115,\r\n        \"shipping_country\": 115\r\n    }");
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key=your_api_key")
  .method("PUT", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Cookie", "csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7")
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_PUT);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json',
  'Cookie' => 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
));
$request->setBody('{
\n        "customer_type": 2,
\n        "first_name": "karan",
\n        "last_name": "Sharma",
\n        "company_name": "Apple",
\n        "email": "karan@gmail.com",
\n        "phone": "09871233960",
\n        "website": "https://payinvoice.dailymails.org/",
\n        "billing_state": "Rajasthan",
\n        "billing_city": "jaipur",
\n        "billing_zipcode": null,
\n        "billing_address": "Ramgarh Mode",
\n        "currency": 3,
\n        "payment_terms": 1,
\n        "enable_portal": true,
\n        "portal_language": 0,
\n        "shipping_state": "RAJASTHAN",
\n        "shipping_city": "JAIPUR",
\n        "shipping_zipcode": "302020",
\n        "shipping_address": "RAJEEV COLONY",
\n        "billing_country": 115,
\n        "shipping_country": 115
\n    }');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/customers/{id}/?api_key=your_api_key"

payload="{\r\n        \"customer_type\": 2,\r\n        \"first_name\": \"karan\",\r\n        \"last_name\": \"Sharma\",\r\n        \"company_name\": \"Apple\",\r\n        \"email\": \"karan@gmail.com\",\r\n        \"phone\": \"09871233960\",\r\n        \"website\": \"https://payinvoice.dailymails.org/\",\r\n        \"billing_state\": \"Rajasthan\",\r\n        \"billing_city\": \"jaipur\",\r\n        \"billing_zipcode\": null,\r\n        \"billing_address\": \"Ramgarh Mode\",\r\n        \"currency\": 3,\r\n        \"payment_terms\": 1,\r\n        \"enable_portal\": true,\r\n        \"portal_language\": 0,\r\n        \"shipping_state\": \"RAJASTHAN\",\r\n        \"shipping_city\": \"JAIPUR\",\r\n        \"shipping_zipcode\": \"302020\",\r\n        \"shipping_address\": \"RAJEEV COLONY\",\r\n        \"billing_country\": 115,\r\n        \"shipping_country\": 115\r\n    }"
headers = {
  'Content-Type': 'application/json',
  'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'PUT',
  'hostname': 'payinvoice.dailymails.org',
  'path': '/mysite/api/v1/customers/{id}/?api_key=your_api_key',
  'headers': {
    'Content-Type': 'application/json',
    'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({"customer_type":2,"first_name":"karan","last_name":"Sharma","company_name":"Apple","email":"karan@gmail.com","phone":"09871233960","website":"https://payinvoice.dailymails.org/","billing_state":"Rajasthan","billing_city":"jaipur","billing_zipcode":null,"billing_address":"Ramgarh Mode","currency":3,"payment_terms":1,"enable_portal":true,"portal_language":0,"shipping_state":"RAJASTHAN","shipping_city":"JAIPUR","shipping_zipcode":"302020","shipping_address":"RAJEEV COLONY","billing_country":115,"shipping_country":115});

req.write(postData);

req.end();

Products

The PRODUCTS API will be used to get, create, update and delete information of products.

Get Products

Request Method : GET

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/products/?api_key={api_key}

PARAMETERS

Name

Type

Description

Required

api
String
The api key of your account
True

Curl

curl --location --request GET 'https://payinvoice.dailymails.org/mysite/api/v1/products/?api_key=your_api_key'

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/products/?api_key=your_api_key")
  .method("GET", null)
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/products/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));

$request->setBody('');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/products/?api_key=your_api_key"

payload={}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'payinvoice.dailymails.org',
  'path': '/mysite/api/v1/products/?api_key=your_api_key',
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();

Delete Products

Request Method : DELETE

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/products/{id}/?api_key=your_api_key

Parameters

Name

Type

Description

Required

api_key
String
The api key of your account
True
id
String
Product id which will be delete
True

Curl

curl --location --request DELETE 'https://payinvoice.dailymails.org/mysite/api/v1/products/{id}/?api_key=your_api_key' \

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/products/{id}/?api_key=your_api_key")
  .method("DELETE", body)
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/products/{id}/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_DELETE);
$request->setConfig(array(
  'follow_redirects' => TRUE
));

$request->setBody('');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/products/{id}/?api_key=your_api_key"

payload={}
headers = {}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'DELETE',
  'hostname': 'payinvoice.dailymails.org',
  'path': '/mysite/api/v1/products/{id}/?api_key=your_api_key',
  'headers': {},
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();

Product Details

Request Method : GET

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/products/{id}/?api_key={api_key}

Parameters

Name

Type

Description

Required

api_key
String
The api key of your account
True
id
String
Product id of your account
True

Api Results

Name

Result

status
success|fail
id
Re-direct to api url.
error
(if status was fail) describes why the query failed,
Product id is not correct.
User authentication failed. Wrong API Key.

Curl

curl --location --request GET 'https://payinvoice.dailymails.org/mysite/api/v1/products/{id}/?api_key=your_api_key'

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/products/{id}/?api_key=your_api_key")
  .method("GET", null)
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/products/{id}/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setBody('');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/products/{id}/?api_key=your_api_key"

payload={}
headers = {}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'payinvoice.dailymails.org',
  'path': '/mysite/api/v1/products/{id}/?api_key=your_api_key',
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();

Create Products

Request Method : POST

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/products/?api_key={api_key}

Content-Type : application/json

Parameters

Name

Type

Description

Required

Product type
String
Select Product type
True
Name
String
Enter Name
False
Unit
String
Select Unit
False
Selling price
String
Enter the Selling price
False
Sku
String
Enter The Sku
True
Product image
String
Select Product image
False
Description
String
Enter The Description
False

Api Results

Name

Result

status
success|fail
error
(if status was fail) describes why the query failed,
Required parameter missing or invalid.

Curl

curl --location --request POST 'https://payinvoice.dailymails.org/mysite/api/v1/products/?api_key=your_api_key' \
--header 'Content-Type: application/json' \
--header 'Cookie: csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7' \
--data-raw '{
    "product_type": 1,
    "name": "iPhone 12 mini",
    "unit": 1,
    "selling_price": "61000",
    "sku": "promation",
    "product_image": null,
    "description": "In literary theory, a text is any object that can be \"read\", whether this object is a work of literature, a street sign, an arrangement of buildings o"
}'

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"product_type\": 1,\r\n    \"name\": \"iPhone 12 mini\",\r\n    \"unit\": 1,\r\n    \"selling_price\": \"61000\",\r\n    \"sku\": \"promation\",\r\n    \"product_image\": null,\r\n    \"description\": \"In literary theory, a text is any object that can be \\\"read\\\", whether this object is a work of literature, a street sign, an arrangement of buildings o\"\r\n}");
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/products/?api_key=your_api_key")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Cookie", "csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7")
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/products/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json',
  'Cookie' => 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
));
$request->setBody('{
\n    "product_type": 1,
\n    "name": "iPhone 12 mini",
\n    "unit": 1,
\n    "selling_price": "61000",
\n    "sku": "promation",
\n    "product_image": null,
\n    "description": "In literary theory, a text is any object that can be \\"read\\", whether this object is a work of literature, a street sign, an arrangement of buildings o"
\n}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/products/?api_key=your_api_key"

payload="{\r\n    \"product_type\": 1,\r\n    \"name\": \"iPhone 12 mini\",\r\n    \"unit\": 1,\r\n    \"selling_price\": \"61000\",\r\n    \"sku\": \"promation\",\r\n    \"product_image\": null,\r\n    \"description\": \"In literary theory, a text is any object that can be \\\"read\\\", whether this object is a work of literature, a street sign, an arrangement of buildings o\"\r\n}"
headers = {
  'Content-Type': 'application/json',
  'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
'method': 'POST',
'hostname': 'payinvoice.dailymails.org',
'path': '/mysite/api/v1/products/?api_key=your_api_key',
'headers': {
'Content-Type': 'application/json',
'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
},
'maxRedirects': 20
};

var req = https.request(options, function (res) {
var chunks = [];

res.on("data", function (chunk) {
chunks.push(chunk);
});

res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});

res.on("error", function (error) {
console.error(error);
});
});

var postData = JSON.stringify({"product_type":1,"name":"iPhone 12 mini","unit":1,"selling_price":"61000","sku":"promation","product_image":null,"description":"In literary theory, a text is any object that can be \"read\", whether this object is a work of literature, a street sign, an arrangement of buildings o"});

req.write(postData);

req.end();

Update Products

Request Method : PUT

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/products/?api_key={api_key}

Content-Type : application/json

Parameters

Name

Type

Description

Required

api
String
The api key of your account
True
subject
String
The subject of your invoice parameter
True
message
String
The HTML content of your invoice message
True

Api Results

Name

Result

status
success|fail
message
Send|Queued
id
Re-direct to api url.
error
(if status was fail) describes why the query failed,
Request method is not correct.
Required parameter missing or invalid.
User authentication failed. Wrong API Key.

Curl

curl --location --request PUT 'https://payinvoice.dailymails.org/mysite/api/v1/products/38/?api_key=your_api_key' \
--header 'Content-Type: application/json' \
--header 'Cookie: csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7' \
--data-raw '{
    "product_type": 1,
    "name": "iPhone 12 Pro Max",
    "unit": 1,
    "selling_price": "130000",
    "sku": "promation",
    "product_image": null,
    "description": "In literary theory, a text is any object that can be \"read\", whether this object is a work of literature, a street sign, an arrangement of buildings o"
}'

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"product_type\": 1,\r\n    \"name\": \"iPhone 12 Pro Max\",\r\n    \"unit\": 1,\r\n    \"selling_price\": \"130000\",\r\n    \"sku\": \"promation\",\r\n    \"product_image\": null,\r\n    \"description\": \"In literary theory, a text is any object that can be \\\"read\\\", whether this object is a work of literature, a street sign, an arrangement of buildings o\"\r\n}");
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/products/38/?api_key=your_api_key")
  .method("PUT", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Cookie", "csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7")
  .build();
Response response = client.newCall(request).execute();

Php

 <?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/products/38/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_PUT);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json',
  'Cookie' => 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
));
$request->setBody('{
\n    "product_type": 1,
\n    "name": "iPhone 12 Pro Max",
\n    "unit": 1,
\n    "selling_price": "130000",
\n    "sku": "promation",
\n    "product_image": null,
\n    "description": "In literary theory, a text is any object that can be \\"read\\", whether this object is a work of literature, a street sign, an arrangement of buildings o"
\n}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/products/38/?api_key=your_api_key"

payload="{\r\n    \"product_type\": 1,\r\n    \"name\": \"iPhone 12 Pro Max\",\r\n    \"unit\": 1,\r\n    \"selling_price\": \"130000\",\r\n    \"sku\": \"promation\",\r\n    \"product_image\": null,\r\n    \"description\": \"In literary theory, a text is any object that can be \\\"read\\\", whether this object is a work of literature, a street sign, an arrangement of buildings o\"\r\n}"
headers = {
  'Content-Type': 'application/json',
  'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'PUT',
  'hostname': 'payinvoice.dailymails.org',
  'path': '/mysite/api/v1/products/38/?api_key=your_api_key',
  'headers': {
    'Content-Type': 'application/json',
    'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({"product_type":1,"name":"iPhone 12 Pro Max","unit":1,"selling_price":"130000","sku":"promation","product_image":null,"description":"In literary theory, a text is any object that can be \"read\", whether this object is a work of literature, a street sign, an arrangement of buildings o"});

req.write(postData);

req.end();

Invoice & Estimates

The Invoice & Estimates API will be used to get, create, update and delete information of invoice & estimates.

Get Invoices list

Request Method : GET

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/invoices/?api_key={api_key}

Parameters

Name

Type

Description

Required

api
String
The api key of your account
True

Curl

curl --location --request GET 'https://payinvoice.dailymails.org/mysite/api/v1/invoices/?api_key=your_api_key' \
--header 'Cookie: csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7' \
--data-raw ''

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/invoices/?api_key=your_api_key")
  .method("GET", null)
  .addHeader("Cookie", "csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7")
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/invoices/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Cookie' => 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
));
$request->setBody('');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/invoices/?api_key=your_api_key"

payload={}
headers = {
'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'payinvoice.dailymails.org',
  'path': '/mysite/api/v1/invoices/?api_key=your_api_key',
  'headers': {
    'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();

Delete Invoices

Request Method : DELETE

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/invoices/{id}/?api_key={api_key}

Parameters

NAME

Type

Description

Required

api_key
String
The api key of your account
True
id
String
Inv id which will be delete
True

Curl

curl --location --request DELETE 'https://payinvoice.dailymails.org/mysite/api/v1/invoices/63/?api_key=your_api_key' \
--header 'Cookie: csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7' \
--data-raw ''

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/invoices/63/?api_key=your_api_key")
  .method("DELETE", body)
  .addHeader("Cookie", "csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7")
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/invoices/63/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_DELETE);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Cookie' => 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
));
$request->setBody('');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/invoices/63/?api_key=your_api_key"

payload={}
headers = {
  'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
}

response = requests.request("DELETE", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'DELETE',
  'hostname': 'payinvoice.dailymails.org',
  'path': '/mysite/api/v1/invoices/63/?api_key=your_api_key',
  'headers': {
    'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();

Invoice Details

Request Method : GET

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/invoices/{id}/?api_key={api_key}

Parameters

NAME

Type

Description

Required

api_key
String
The api key of your account
True
id
String
Invoice id of your account
True

Api Results

Name

Result

status
success|fail
id
Re-direct to api url.
error
(if status was fail) describes why the query failed,
Invoice id is not correct.
User authentication failed. Wrong API Key.

Curl

  curl --location --request GET 'https://payinvoice.dailymails.org/mysite/api/v1/invoices/62/?api_key=your_api_key' \
--header 'Cookie: csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7' \
--data-raw ''

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/invoices/62/?api_key=your_api_key")
  .method("GET", null)
  .addHeader("Cookie", "csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7")
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/invoices/62/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Cookie' => 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
));
$request->setBody('');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/invoices/62/?api_key=your_api_key"

payload={}
headers = {
  'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'GET',
  'hostname': 'payinvoice.dailymails.org',
  'path': '/mysite/api/v1/invoices/62/?api_key=your_api_key',
  'headers': {
    'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

req.end();

Create Invoice

Request Method : POST

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/invoices/?api_key={api_key}

Content-Type : application/json

Parameters

NAME

Type

Description

Required

Invoice number
String
Enter Invoice number
True
Order number
String
Enter Order number
False
Invoice date
String
Enter Invoice date
False
Terms
String
Select Terms
False
Due date
String
Enter Due date
True
Subject
String
Enter Subject
False
Status
String
Select Status
False
Invoice type
String
Select Invoice type
False
Customer
String
Select Customer
False

Api Results

Name

Result

status
success|fail
error
(if status was fail) describes why the query failed,
Required parameter missing or invalid.

Request Body

{
"productinvoices": [
{
"quantity": "0.00",
"rate": "90.00",
"discount": "0.00",
"discount_unit": 0,
"amount": "0.00",
"products": 34
}
],
"invoice_number": "498454",
"order_number": "4613135134",
"invoice_date": "2021-05-15",
"terms": 0,
"due_date": "2021-04-01",
"subject": "",
"subtotal": "0.00",
"total": "0.00",
"status": 2,
"invoice_type": 1,
"customer": 33
}

Curl

curl --location --request POST 'https://payinvoice.dailymails.org/mysite/api/v1/invoices/?api_key=your_api_key' \
--header 'Content-Type: application/json' \
--header 'Cookie: csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7' \
--data-raw '{
"productinvoices": [
{
"quantity": "0.00",
"rate": "90.00",
"discount": "0.00",
"discount_unit": 0,
"amount": "0.00",
"products": 34
}
],
"invoice_number": "10001",
"order_number": "123456",
"invoice_date": "2021-05-15",
"terms": 0,
"due_date": "2021-04-01",
"subject": "",
"subtotal": "0.00",
"total": "0.00",
"status": 2,
"invoice_type": 1,
"customer": 33
}'

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n\"productinvoices\": [\r\n{\r\n\"quantity\": \"0.00\",\r\n\"rate\": \"90.00\",\r\n\"discount\": \"0.00\",\r\n\"discount_unit\": 0,\r\n\"amount\": \"0.00\",\r\n\"products\": 34\r\n}\r\n],\r\n\"invoice_number\": \"10001\",\r\n\"order_number\": \"123456\",\r\n\"invoice_date\": \"2021-05-15\",\r\n\"terms\": 0,\r\n\"due_date\": \"2021-04-01\",\r\n\"subject\": \"\",\r\n\"subtotal\": \"0.00\",\r\n\"total\": \"0.00\",\r\n\"status\": 2,\r\n\"invoice_type\": 1,\r\n\"customer\": 33\r\n}");
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/invoices/?api_key=your_api_key")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Cookie", "csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7")
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/invoices/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json',
  'Cookie' => 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
));
$request->setBody('{
\n"productinvoices": [
\n{
\n"quantity": "0.00",
\n"rate": "90.00",
\n"discount": "0.00",
\n"discount_unit": 0,
\n"amount": "0.00",
\n"products": 34
\n}
\n],
\n"invoice_number": "10001",
\n"order_number": "123456",
\n"invoice_date": "2021-05-15",
\n"terms": 0,
\n"due_date": "2021-04-01",
\n"subject": "",
\n"subtotal": "0.00",
\n"total": "0.00",
\n"status": 2,
\n"invoice_type": 1,
\n"customer": 33
\n}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/invoices/?api_key=your_api_key"

payload="{\r\n\"productinvoices\": [\r\n{\r\n\"quantity\": \"0.00\",\r\n\"rate\": \"90.00\",\r\n\"discount\": \"0.00\",\r\n\"discount_unit\": 0,\r\n\"amount\": \"0.00\",\r\n\"products\": 34\r\n}\r\n],\r\n\"invoice_number\": \"10001\",\r\n\"order_number\": \"123456\",\r\n\"invoice_date\": \"2021-05-15\",\r\n\"terms\": 0,\r\n\"due_date\": \"2021-04-01\",\r\n\"subject\": \"\",\r\n\"subtotal\": \"0.00\",\r\n\"total\": \"0.00\",\r\n\"status\": 2,\r\n\"invoice_type\": 1,\r\n\"customer\": 33\r\n}"
headers = {
  'Content-Type': 'application/json',
  'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'POST',
  'hostname': 'payinvoice.dailymails.org',
  'path': '/mysite/api/v1/invoices/?api_key=your_api_key',
  'headers': {
    'Content-Type': 'application/json',
    'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({"productinvoices":[{"quantity":"0.00","rate":"90.00","discount":"0.00","discount_unit":0,"amount":"0.00","products":34}],"invoice_number":"10001","order_number":"123456","invoice_date":"2021-05-15","terms":0,"due_date":"2021-04-01","subject":"","subtotal":"0.00","total":"0.00","status":2,"invoice_type":1,"customer":33});

req.write(postData);

req.end();

Update Invoices

Request Method : PUT

Endpoint : https://payinvoice.dailymails.org/mysite/api/v1/invoices/?api_key={api_key}

Content-Type : application/json

Parameters

NAME

Type

Description

Required

api
String
The api key of your account
True
subject
String
The subject of your invoice parameter
True
message
String
The HTML content of your invoice message
True

Api Results

Name

Result

status
success|fail
message
Send|Queued
id
Re-direct to api url.
error
(if status was fail) describes why the query failed,
Request method is not correct.
Required parameter missing or invalid.
User authentication failed. Wrong API Key.

Curl

curl --location --request PUT 'https://payinvoice.dailymails.org/mysite/api/v1/invoices/69/?api_key=your_api_key' \
--header 'Content-Type: application/json' \
--header 'Cookie: csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7' \
--data-raw '{
    "id": 69,
    "productinvoices": [
        {
            "id": 149,
            "quantity": "0.00",
            "rate": "105.00",
            "discount": "0.00",
            "discount_unit": 0,
            "amount": "0.00",
            "products": 34
        }
    ],
    "active": true,
    "added_date": "2021-03-27T19:03:12.707675+05:30",
    "modified_date": "2021-03-27T19:03:18.913799+05:30",
    "invoice_number": "10001",
    "order_number": "123456",
    "invoice_date": "2021-05-15",
    "terms": 0,
    "due_date": "2021-04-01",
    "subject": "UPDATE",
    "subtotal": "0.00",
    "total": "0.00",
    "status": 2,
    "invoice_type": 1,
    "customer": 33
}'

Java

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n    \"id\": 69,\r\n    \"productinvoices\": [\r\n        {\r\n            \"id\": 149,\r\n            \"quantity\": \"0.00\",\r\n            \"rate\": \"105.00\",\r\n            \"discount\": \"0.00\",\r\n            \"discount_unit\": 0,\r\n            \"amount\": \"0.00\",\r\n            \"products\": 34\r\n        }\r\n    ],\r\n    \"active\": true,\r\n    \"added_date\": \"2021-03-27T19:03:12.707675+05:30\",\r\n    \"modified_date\": \"2021-03-27T19:03:18.913799+05:30\",\r\n    \"invoice_number\": \"10001\",\r\n    \"order_number\": \"123456\",\r\n    \"invoice_date\": \"2021-05-15\",\r\n    \"terms\": 0,\r\n    \"due_date\": \"2021-04-01\",\r\n    \"subject\": \"UPDATE\",\r\n    \"subtotal\": \"0.00\",\r\n    \"total\": \"0.00\",\r\n    \"status\": 2,\r\n    \"invoice_type\": 1,\r\n    \"customer\": 33\r\n}");
Request request = new Request.Builder()
  .url("https://payinvoice.dailymails.org/mysite/api/v1/invoices/69/?api_key=your_api_key")
  .method("PUT", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Cookie", "csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7")
  .build();
Response response = client.newCall(request).execute();

Php

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://payinvoice.dailymails.org/mysite/api/v1/invoices/69/?api_key=your_api_key');
$request->setMethod(HTTP_Request2::METHOD_PUT);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json',
  'Cookie' => 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
));
$request->setBody('{
\n    "id": 69,
\n    "productinvoices": [
\n        {
\n            "id": 149,
\n            "quantity": "0.00",
\n            "rate": "105.00",
\n            "discount": "0.00",
\n            "discount_unit": 0,
\n            "amount": "0.00",
\n            "products": 34
\n        }
\n    ],
\n    "active": true,
\n    "added_date": "2021-03-27T19:03:12.707675+05:30",
\n    "modified_date": "2021-03-27T19:03:18.913799+05:30",
\n    "invoice_number": "10001",
\n    "order_number": "123456",
\n    "invoice_date": "2021-05-15",
\n    "terms": 0,
\n    "due_date": "2021-04-01",
\n    "subject": "UPDATE",
\n    "subtotal": "0.00",
\n    "total": "0.00",
\n    "status": 2,
\n    "invoice_type": 1,
\n    "customer": 33
\n}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

Python

import requests

url = "https://payinvoice.dailymails.org/mysite/api/v1/invoices/69/?api_key=your_api_key"

payload="{\r\n    \"id\": 69,\r\n    \"productinvoices\": [\r\n        {\r\n            \"id\": 149,\r\n            \"quantity\": \"0.00\",\r\n            \"rate\": \"105.00\",\r\n            \"discount\": \"0.00\",\r\n            \"discount_unit\": 0,\r\n            \"amount\": \"0.00\",\r\n            \"products\": 34\r\n        }\r\n    ],\r\n    \"active\": true,\r\n    \"added_date\": \"2021-03-27T19:03:12.707675+05:30\",\r\n    \"modified_date\": \"2021-03-27T19:03:18.913799+05:30\",\r\n    \"invoice_number\": \"10001\",\r\n    \"order_number\": \"123456\",\r\n    \"invoice_date\": \"2021-05-15\",\r\n    \"terms\": 0,\r\n    \"due_date\": \"2021-04-01\",\r\n    \"subject\": \"UPDATE\",\r\n    \"subtotal\": \"0.00\",\r\n    \"total\": \"0.00\",\r\n    \"status\": 2,\r\n    \"invoice_type\": 1,\r\n    \"customer\": 33\r\n}"
headers = {
  'Content-Type': 'application/json',
  'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
}

response = requests.request("PUT", url, headers=headers, data=payload)

print(response.text)

Nodejs

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'PUT',
  'hostname': 'payinvoice.dailymails.org',
  'path': '/mysite/api/v1/invoices/69/?api_key=your_api_key',
  'headers': {
    'Content-Type': 'application/json',
    'Cookie': 'csrftoken=QS7W7yKKnH3JbjPf12f6NwNiuwo09fFvx0XdcTskZgStRDMCMKZhbIIdfIm06mj7'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({"id":69,"productinvoices":[{"id":149,"quantity":"0.00","rate":"105.00","discount":"0.00","discount_unit":0,"amount":"0.00","products":34}],"active":true,"added_date":"2021-03-27T19:03:12.707675+05:30","modified_date":"2021-03-27T19:03:18.913799+05:30","invoice_number":"10001","order_number":"123456","invoice_date":"2021-05-15","terms":0,"due_date":"2021-04-01","subject":"UPDATE","subtotal":"0.00","total":"0.00","status":2,"invoice_type":1,"customer":33});

req.write(postData);

req.end();