Update invoice simplified
Updates an invoice with simplified approach.
Endpoint
PUT /integration/invoice/simplify/{id}
HTTP Request
PUT /integration/invoice/simplify/{id}
Update invoice object
{
"invoiceDate": "2024-07-23T13:22:32.309Z",
"invoiceNumber": "string",
"dueDate": "2024-07-23T13:22:32.309Z",
"expirationDate": "2024-07-23T13:22:32.309Z",
"subTotal": 0,
"totalAmount": 0,
"taxAmount": 0,
"amountDue": 0,
"lines": [
{
"description": "Item 1",
"unitAmount": 500,
"quantity": 2,
"subTotal": 1000,
"taxAmount": 100,
"totalAmount": 1100
}
],
"sourceModifiedDate": "2024-07-23T13:22:32.309Z",
"payersInfo": [
{
"firstName": "string",
"lastName": "string",
"emailAddress": "string",
"cellPhoneNumber": "string",
"businessName": "string"
}
]
}
Successful response
HTTP 202
{
"details": {
"totalAmount": 1100
}
}
Erroneous response
HTTP 404
{
"code": "404",
"reason": "Invoice not exists."
}
Responses
| Code | Description |
|---|---|
| 202 | Updated, successful operation |
| 400 | Invalid request |
| 401 | Unauthorized |
| 404 | Not found |
| 500 | Unexpected error |
Examples
curl https://api.bluetape.com/genericBthubService/integration/invoice/simplify/{id} \
-X PUT \
-H "X-BlueTape-Key: <your-key>" \
-H "X-Integration-AccountId: <your-account-id>" \
-H "Content-Type: application/json" \
-d "@request.json"
import fetch from 'node-fetch';
const invoice = { ... };
const url = 'https://api.bluetape.com/genericBthubService/integration/invoice/simplify/{id}';
const options = {
method: 'PUT',
headers: {
'X-BlueTape-Key': '<your-key>',
'X-Integration-AccountId': '<your-account-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify(invoice)
};
fetch(url, options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
using Flurl.Http;
var invoice = new Invoice() {
...
};
var result = await "https://api.bluetape.com/genericBthubService/integration/invoice/simplify/{id}"
.WithHeader("X-BlueTape-Key", "<your-key>")
.WithHeader("X-Integration-AccountId", "<your-account-id>")
.WithHeader("Content-Type", "application/json")
.PutJsonAsync(invoice)
.ReceiveJson<BlueTapeIntegrationResult>();
import requests
url = "https://api.bluetape.com/genericBthubService/integration/invoice/simplify/{id}"
headers = {
"X-BlueTape-Key": "<your-key>",
"X-Integration-AccountId": "<your-account-id>",
"Content-Type": "application/json"
}
data = <your-invoice-data>
response = requests.put(url, headers=headers, data=data)
print(response.text)