API-V2

Application Programming Interface

InvoiceXpress Documentation

Delete treasury movement

DELETE /api/v3/clients/:client-id/treasury_movements/:id.json

Deletes a client’s treasury movement.

Example Request

curl

curl --request DELETE \
  --url 'https://account_name.app.invoicexpress.com/api/v3/clients/:client-id/treasury_movements/:id.json?api_key=YOUR%20API%20KEY%20HERE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json'

Ruby

require 'uri'
require 'net/http'

url = URI("https://account_name.app.invoicexpress.com/api/v3/clients/:client-id/treasury_movements/:id.json?api_key=YOUR%20API%20KEY%20HERE")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body

Node

var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "account_name.app.invoicexpress.com",
  "port": null,
  "path": "/api/v3/clients/:client-id/treasury_movements/:id.json?api_key=YOUR%20API%20KEY%20HERE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

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

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

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

req.end();

Python

import http.client

conn = http.client.HTTPSConnection("account_name.app.invoicexpress.com")

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("DELETE", "/api/v3/clients/:client-id/treasury_movements/:id.json?api_key=YOUR%20API%20KEY%20HERE", headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))

PHP

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://account_name.app.invoicexpress.com/api/v3/clients/:client-id/treasury_movements/:id.json?api_key=YOUR%20API%20KEY%20HERE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Go

package main

import (
    "fmt"
    "strings"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://account_name.app.invoicexpress.com/api/v3/clients/:client-id/treasury_movements/:id.json?api_key=YOUR%20API%20KEY%20HERE"

    req, _ := http.NewRequest("DELETE", url)

    req.Header.Add("accept", "application/json")
    req.Header.Add("content-type", "application/json")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}

Path Parameters

NameTypeRequiredDescriptionExample
client-idIntegerRequiredThe ID of the client you want to get.42
idIntegerRequiredThe ID of the treasury movement you want to delete.1

Responses

201SUCCESSAccounts Create response
401ACCESS DENIED
The API Key parameter is missing or is incorrectly entered.
(Empty Response)
404NOT FOUND
No client matches the supplied client-id.
(Empty Response)

Delete treasury movement

Após realizar a sua inscrição nesta página irá receber um email de confirmação automático (pode demorar alguns minutos). Esteja atento à sua caixa de entrada, e verifique se o mesmo porventura não terá ido parar à caixa de spam do seu email.