Add a new invoice confirm. To call this, you need to have access right of 100400, 'resTyp' is only ART allowed and you need right to access to product management.
curl -X POST "https://api.example.com/restapi/v1/invoiceConfirm" \
-H "Content-Type: application/json" \
-d '{
"tcpId": 123,
"contactId": 123,
"addressId": 123,
"elements": [
{
"resTyp": "example_string",
"resId": 123,
"dateStart": "example_string",
"timeStart": "example_string",
"dateEnd": "example_string",
"timeEnd": "example_string"
}
]
}'
import requests
import json
url = "https://api.example.com/restapi/v1/invoiceConfirm"
headers = {
"Content-Type": "application/json"
}
data = {
"tcpId": 123,
"contactId": 123,
"addressId": 123,
"elements": [
{
"resTyp": "example_string",
"resId": 123,
"dateStart": "example_string",
"timeStart": "example_string",
"dateEnd": "example_string",
"timeEnd": "example_string"
}
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.example.com/restapi/v1/invoiceConfirm", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"tcpId": 123,
"contactId": 123,
"addressId": 123,
"elements": [
{
"resTyp": "example_string",
"resId": 123,
"dateStart": "example_string",
"timeStart": "example_string",
"dateEnd": "example_string",
"timeEnd": "example_string"
}
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"tcpId": 123,
"contactId": 123,
"addressId": 123,
"elements": [
{
"resTyp": "example_string",
"resId": 123,
"dateStart": "example_string",
"timeStart": "example_string",
"dateEnd": "example_string",
"timeEnd": "example_string"
}
]
}`)
req, err := http.NewRequest("POST", "https://api.example.com/restapi/v1/invoiceConfirm", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.example.com/restapi/v1/invoiceConfirm')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request.body = '{
"tcpId": 123,
"contactId": 123,
"addressId": 123,
"elements": [
{
"resTyp": "example_string",
"resId": 123,
"dateStart": "example_string",
"timeStart": "example_string",
"dateEnd": "example_string",
"timeEnd": "example_string"
}
]
}'
response = http.request(request)
puts response.body
[
{
"id": 123,
"typ": "example_string",
"elements": [
{
"id": 123,
"typ": "example_string",
"elementContent": "example_string",
"postId": 123,
"postTyp": "example_string",
"postName": "John Doe",
"posDescription": "example_string",
"posTaxIncluded": 42,
"posTaxAmount": 42,
"posPriceTotal": 29.99,
"posCurrency": "example_string",
"posDateStart": "example_string",
"posTimeStart": "example_string",
"posDateEnd": "example_string",
"posTimeEnd": "example_string"
}
]
}
]
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Error",
"message": "Method not allowed",
"code": 405
}
POST
/invoiceConfirm
POST
Base URLstring
Target server for requests. Edit to use your own host.
Content-Typestring
RequiredThe media type of the request body
Options: application/json
Request Preview
Response
Response will appear here after sending the request
Body
application/json
Responses
idinteger
typstring
elementsarray
Was this page helpful?