Create a new invoice
curl --request POST \
--url http://localhost/api/invoices \
--header 'Content-Type: application/json' \
--data '
{
"identification": {
"seller": {
"pink_id": "<string>",
"gln": "<string>"
},
"buyer": {
"pink_id": "<string>",
"gln": "<string>"
},
"pink_id": "<string>",
"seller_invoice_id": "<string>"
},
"issue_date": "2023-11-07T05:31:56Z",
"buyer": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"line2": "<string>"
},
"identification": {
"gln": "<string>",
"tax_id": "<string>"
}
},
"invoice_recipient": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"line2": "<string>"
},
"identification": {
"gln": "<string>",
"tax_id": "<string>"
}
},
"supplier": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"line2": "<string>"
},
"identification": {
"gln": "<string>",
"tax_id": "<string>"
}
},
"lines": [
{
"line_number": "<string>",
"product_id": "<string>",
"product_name": "<string>",
"quantity": 123,
"references": [
{
"identification": {
"vendor_id": "<string>",
"pink_id": "<string>"
},
"line_number": 123
}
],
"tax_details": [
{
"rate": 123,
"amount": {
"amount": 123
},
"type": "<string>"
}
],
"delivery_date": "2023-11-07T05:31:56Z",
"free_text": "<string>"
}
],
"total_amount": {
"amount": 123
},
"net_amount": {
"amount": 123
},
"tax_details": [
{
"rate": 123,
"amount": {
"amount": 123
},
"type": "<string>"
}
],
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"payment_due_date": "2023-11-07T05:31:56Z",
"payment_terms": "<string>"
}
'import requests
url = "http://localhost/api/invoices"
payload = {
"identification": {
"seller": {
"pink_id": "<string>",
"gln": "<string>"
},
"buyer": {
"pink_id": "<string>",
"gln": "<string>"
},
"pink_id": "<string>",
"seller_invoice_id": "<string>"
},
"issue_date": "2023-11-07T05:31:56Z",
"buyer": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"line2": "<string>"
},
"identification": {
"gln": "<string>",
"tax_id": "<string>"
}
},
"invoice_recipient": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"line2": "<string>"
},
"identification": {
"gln": "<string>",
"tax_id": "<string>"
}
},
"supplier": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"line2": "<string>"
},
"identification": {
"gln": "<string>",
"tax_id": "<string>"
}
},
"lines": [
{
"line_number": "<string>",
"product_id": "<string>",
"product_name": "<string>",
"quantity": 123,
"references": [
{
"identification": {
"vendor_id": "<string>",
"pink_id": "<string>"
},
"line_number": 123
}
],
"tax_details": [
{
"rate": 123,
"amount": { "amount": 123 },
"type": "<string>"
}
],
"delivery_date": "2023-11-07T05:31:56Z",
"free_text": "<string>"
}
],
"total_amount": { "amount": 123 },
"net_amount": { "amount": 123 },
"tax_details": [
{
"rate": 123,
"amount": { "amount": 123 },
"type": "<string>"
}
],
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"payment_due_date": "2023-11-07T05:31:56Z",
"payment_terms": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
identification: {
seller: {pink_id: '<string>', gln: '<string>'},
buyer: {pink_id: '<string>', gln: '<string>'},
pink_id: '<string>',
seller_invoice_id: '<string>'
},
issue_date: '2023-11-07T05:31:56Z',
buyer: {
name: '<string>',
address: {
line1: '<string>',
city: '<string>',
postal_code: '<string>',
line2: '<string>'
},
identification: {gln: '<string>', tax_id: '<string>'}
},
invoice_recipient: {
name: '<string>',
address: {
line1: '<string>',
city: '<string>',
postal_code: '<string>',
line2: '<string>'
},
identification: {gln: '<string>', tax_id: '<string>'}
},
supplier: {
name: '<string>',
address: {
line1: '<string>',
city: '<string>',
postal_code: '<string>',
line2: '<string>'
},
identification: {gln: '<string>', tax_id: '<string>'}
},
lines: [
{
line_number: '<string>',
product_id: '<string>',
product_name: '<string>',
quantity: 123,
references: [
{identification: {vendor_id: '<string>', pink_id: '<string>'}, line_number: 123}
],
tax_details: [{rate: 123, amount: {amount: 123}, type: '<string>'}],
delivery_date: '2023-11-07T05:31:56Z',
free_text: '<string>'
}
],
total_amount: {amount: 123},
net_amount: {amount: 123},
tax_details: [{rate: 123, amount: {amount: 123}, type: '<string>'}],
period_start: '2023-11-07T05:31:56Z',
period_end: '2023-11-07T05:31:56Z',
payment_due_date: '2023-11-07T05:31:56Z',
payment_terms: '<string>'
})
};
fetch('http://localhost/api/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://localhost/api/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'identification' => [
'seller' => [
'pink_id' => '<string>',
'gln' => '<string>'
],
'buyer' => [
'pink_id' => '<string>',
'gln' => '<string>'
],
'pink_id' => '<string>',
'seller_invoice_id' => '<string>'
],
'issue_date' => '2023-11-07T05:31:56Z',
'buyer' => [
'name' => '<string>',
'address' => [
'line1' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'line2' => '<string>'
],
'identification' => [
'gln' => '<string>',
'tax_id' => '<string>'
]
],
'invoice_recipient' => [
'name' => '<string>',
'address' => [
'line1' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'line2' => '<string>'
],
'identification' => [
'gln' => '<string>',
'tax_id' => '<string>'
]
],
'supplier' => [
'name' => '<string>',
'address' => [
'line1' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'line2' => '<string>'
],
'identification' => [
'gln' => '<string>',
'tax_id' => '<string>'
]
],
'lines' => [
[
'line_number' => '<string>',
'product_id' => '<string>',
'product_name' => '<string>',
'quantity' => 123,
'references' => [
[
'identification' => [
'vendor_id' => '<string>',
'pink_id' => '<string>'
],
'line_number' => 123
]
],
'tax_details' => [
[
'rate' => 123,
'amount' => [
'amount' => 123
],
'type' => '<string>'
]
],
'delivery_date' => '2023-11-07T05:31:56Z',
'free_text' => '<string>'
]
],
'total_amount' => [
'amount' => 123
],
'net_amount' => [
'amount' => 123
],
'tax_details' => [
[
'rate' => 123,
'amount' => [
'amount' => 123
],
'type' => '<string>'
]
],
'period_start' => '2023-11-07T05:31:56Z',
'period_end' => '2023-11-07T05:31:56Z',
'payment_due_date' => '2023-11-07T05:31:56Z',
'payment_terms' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost/api/invoices"
payload := strings.NewReader("{\n \"identification\": {\n \"seller\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"buyer\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"pink_id\": \"<string>\",\n \"seller_invoice_id\": \"<string>\"\n },\n \"issue_date\": \"2023-11-07T05:31:56Z\",\n \"buyer\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"invoice_recipient\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"supplier\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"lines\": [\n {\n \"line_number\": \"<string>\",\n \"product_id\": \"<string>\",\n \"product_name\": \"<string>\",\n \"quantity\": 123,\n \"references\": [\n {\n \"identification\": {\n \"vendor_id\": \"<string>\",\n \"pink_id\": \"<string>\"\n },\n \"line_number\": 123\n }\n ],\n \"tax_details\": [\n {\n \"rate\": 123,\n \"amount\": {\n \"amount\": 123\n },\n \"type\": \"<string>\"\n }\n ],\n \"delivery_date\": \"2023-11-07T05:31:56Z\",\n \"free_text\": \"<string>\"\n }\n ],\n \"total_amount\": {\n \"amount\": 123\n },\n \"net_amount\": {\n \"amount\": 123\n },\n \"tax_details\": [\n {\n \"rate\": 123,\n \"amount\": {\n \"amount\": 123\n },\n \"type\": \"<string>\"\n }\n ],\n \"period_start\": \"2023-11-07T05:31:56Z\",\n \"period_end\": \"2023-11-07T05:31:56Z\",\n \"payment_due_date\": \"2023-11-07T05:31:56Z\",\n \"payment_terms\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost/api/invoices")
.header("Content-Type", "application/json")
.body("{\n \"identification\": {\n \"seller\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"buyer\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"pink_id\": \"<string>\",\n \"seller_invoice_id\": \"<string>\"\n },\n \"issue_date\": \"2023-11-07T05:31:56Z\",\n \"buyer\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"invoice_recipient\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"supplier\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"lines\": [\n {\n \"line_number\": \"<string>\",\n \"product_id\": \"<string>\",\n \"product_name\": \"<string>\",\n \"quantity\": 123,\n \"references\": [\n {\n \"identification\": {\n \"vendor_id\": \"<string>\",\n \"pink_id\": \"<string>\"\n },\n \"line_number\": 123\n }\n ],\n \"tax_details\": [\n {\n \"rate\": 123,\n \"amount\": {\n \"amount\": 123\n },\n \"type\": \"<string>\"\n }\n ],\n \"delivery_date\": \"2023-11-07T05:31:56Z\",\n \"free_text\": \"<string>\"\n }\n ],\n \"total_amount\": {\n \"amount\": 123\n },\n \"net_amount\": {\n \"amount\": 123\n },\n \"tax_details\": [\n {\n \"rate\": 123,\n \"amount\": {\n \"amount\": 123\n },\n \"type\": \"<string>\"\n }\n ],\n \"period_start\": \"2023-11-07T05:31:56Z\",\n \"period_end\": \"2023-11-07T05:31:56Z\",\n \"payment_due_date\": \"2023-11-07T05:31:56Z\",\n \"payment_terms\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/api/invoices")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"identification\": {\n \"seller\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"buyer\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"pink_id\": \"<string>\",\n \"seller_invoice_id\": \"<string>\"\n },\n \"issue_date\": \"2023-11-07T05:31:56Z\",\n \"buyer\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"invoice_recipient\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"supplier\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"lines\": [\n {\n \"line_number\": \"<string>\",\n \"product_id\": \"<string>\",\n \"product_name\": \"<string>\",\n \"quantity\": 123,\n \"references\": [\n {\n \"identification\": {\n \"vendor_id\": \"<string>\",\n \"pink_id\": \"<string>\"\n },\n \"line_number\": 123\n }\n ],\n \"tax_details\": [\n {\n \"rate\": 123,\n \"amount\": {\n \"amount\": 123\n },\n \"type\": \"<string>\"\n }\n ],\n \"delivery_date\": \"2023-11-07T05:31:56Z\",\n \"free_text\": \"<string>\"\n }\n ],\n \"total_amount\": {\n \"amount\": 123\n },\n \"net_amount\": {\n \"amount\": 123\n },\n \"tax_details\": [\n {\n \"rate\": 123,\n \"amount\": {\n \"amount\": 123\n },\n \"type\": \"<string>\"\n }\n ],\n \"period_start\": \"2023-11-07T05:31:56Z\",\n \"period_end\": \"2023-11-07T05:31:56Z\",\n \"payment_due_date\": \"2023-11-07T05:31:56Z\",\n \"payment_terms\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Invoice created successfully",
"transmission_id": "<string>",
"": "<string>"
}{
"error": "<string>"
}{
"message": "<string>"
}{
"error": "Invalid request data",
"errors": "<string>"
}Invoice
Create a new invoice
POST
/
invoices
Create a new invoice
curl --request POST \
--url http://localhost/api/invoices \
--header 'Content-Type: application/json' \
--data '
{
"identification": {
"seller": {
"pink_id": "<string>",
"gln": "<string>"
},
"buyer": {
"pink_id": "<string>",
"gln": "<string>"
},
"pink_id": "<string>",
"seller_invoice_id": "<string>"
},
"issue_date": "2023-11-07T05:31:56Z",
"buyer": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"line2": "<string>"
},
"identification": {
"gln": "<string>",
"tax_id": "<string>"
}
},
"invoice_recipient": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"line2": "<string>"
},
"identification": {
"gln": "<string>",
"tax_id": "<string>"
}
},
"supplier": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"line2": "<string>"
},
"identification": {
"gln": "<string>",
"tax_id": "<string>"
}
},
"lines": [
{
"line_number": "<string>",
"product_id": "<string>",
"product_name": "<string>",
"quantity": 123,
"references": [
{
"identification": {
"vendor_id": "<string>",
"pink_id": "<string>"
},
"line_number": 123
}
],
"tax_details": [
{
"rate": 123,
"amount": {
"amount": 123
},
"type": "<string>"
}
],
"delivery_date": "2023-11-07T05:31:56Z",
"free_text": "<string>"
}
],
"total_amount": {
"amount": 123
},
"net_amount": {
"amount": 123
},
"tax_details": [
{
"rate": 123,
"amount": {
"amount": 123
},
"type": "<string>"
}
],
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"payment_due_date": "2023-11-07T05:31:56Z",
"payment_terms": "<string>"
}
'import requests
url = "http://localhost/api/invoices"
payload = {
"identification": {
"seller": {
"pink_id": "<string>",
"gln": "<string>"
},
"buyer": {
"pink_id": "<string>",
"gln": "<string>"
},
"pink_id": "<string>",
"seller_invoice_id": "<string>"
},
"issue_date": "2023-11-07T05:31:56Z",
"buyer": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"line2": "<string>"
},
"identification": {
"gln": "<string>",
"tax_id": "<string>"
}
},
"invoice_recipient": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"line2": "<string>"
},
"identification": {
"gln": "<string>",
"tax_id": "<string>"
}
},
"supplier": {
"name": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"postal_code": "<string>",
"line2": "<string>"
},
"identification": {
"gln": "<string>",
"tax_id": "<string>"
}
},
"lines": [
{
"line_number": "<string>",
"product_id": "<string>",
"product_name": "<string>",
"quantity": 123,
"references": [
{
"identification": {
"vendor_id": "<string>",
"pink_id": "<string>"
},
"line_number": 123
}
],
"tax_details": [
{
"rate": 123,
"amount": { "amount": 123 },
"type": "<string>"
}
],
"delivery_date": "2023-11-07T05:31:56Z",
"free_text": "<string>"
}
],
"total_amount": { "amount": 123 },
"net_amount": { "amount": 123 },
"tax_details": [
{
"rate": 123,
"amount": { "amount": 123 },
"type": "<string>"
}
],
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"payment_due_date": "2023-11-07T05:31:56Z",
"payment_terms": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
identification: {
seller: {pink_id: '<string>', gln: '<string>'},
buyer: {pink_id: '<string>', gln: '<string>'},
pink_id: '<string>',
seller_invoice_id: '<string>'
},
issue_date: '2023-11-07T05:31:56Z',
buyer: {
name: '<string>',
address: {
line1: '<string>',
city: '<string>',
postal_code: '<string>',
line2: '<string>'
},
identification: {gln: '<string>', tax_id: '<string>'}
},
invoice_recipient: {
name: '<string>',
address: {
line1: '<string>',
city: '<string>',
postal_code: '<string>',
line2: '<string>'
},
identification: {gln: '<string>', tax_id: '<string>'}
},
supplier: {
name: '<string>',
address: {
line1: '<string>',
city: '<string>',
postal_code: '<string>',
line2: '<string>'
},
identification: {gln: '<string>', tax_id: '<string>'}
},
lines: [
{
line_number: '<string>',
product_id: '<string>',
product_name: '<string>',
quantity: 123,
references: [
{identification: {vendor_id: '<string>', pink_id: '<string>'}, line_number: 123}
],
tax_details: [{rate: 123, amount: {amount: 123}, type: '<string>'}],
delivery_date: '2023-11-07T05:31:56Z',
free_text: '<string>'
}
],
total_amount: {amount: 123},
net_amount: {amount: 123},
tax_details: [{rate: 123, amount: {amount: 123}, type: '<string>'}],
period_start: '2023-11-07T05:31:56Z',
period_end: '2023-11-07T05:31:56Z',
payment_due_date: '2023-11-07T05:31:56Z',
payment_terms: '<string>'
})
};
fetch('http://localhost/api/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://localhost/api/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'identification' => [
'seller' => [
'pink_id' => '<string>',
'gln' => '<string>'
],
'buyer' => [
'pink_id' => '<string>',
'gln' => '<string>'
],
'pink_id' => '<string>',
'seller_invoice_id' => '<string>'
],
'issue_date' => '2023-11-07T05:31:56Z',
'buyer' => [
'name' => '<string>',
'address' => [
'line1' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'line2' => '<string>'
],
'identification' => [
'gln' => '<string>',
'tax_id' => '<string>'
]
],
'invoice_recipient' => [
'name' => '<string>',
'address' => [
'line1' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'line2' => '<string>'
],
'identification' => [
'gln' => '<string>',
'tax_id' => '<string>'
]
],
'supplier' => [
'name' => '<string>',
'address' => [
'line1' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'line2' => '<string>'
],
'identification' => [
'gln' => '<string>',
'tax_id' => '<string>'
]
],
'lines' => [
[
'line_number' => '<string>',
'product_id' => '<string>',
'product_name' => '<string>',
'quantity' => 123,
'references' => [
[
'identification' => [
'vendor_id' => '<string>',
'pink_id' => '<string>'
],
'line_number' => 123
]
],
'tax_details' => [
[
'rate' => 123,
'amount' => [
'amount' => 123
],
'type' => '<string>'
]
],
'delivery_date' => '2023-11-07T05:31:56Z',
'free_text' => '<string>'
]
],
'total_amount' => [
'amount' => 123
],
'net_amount' => [
'amount' => 123
],
'tax_details' => [
[
'rate' => 123,
'amount' => [
'amount' => 123
],
'type' => '<string>'
]
],
'period_start' => '2023-11-07T05:31:56Z',
'period_end' => '2023-11-07T05:31:56Z',
'payment_due_date' => '2023-11-07T05:31:56Z',
'payment_terms' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost/api/invoices"
payload := strings.NewReader("{\n \"identification\": {\n \"seller\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"buyer\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"pink_id\": \"<string>\",\n \"seller_invoice_id\": \"<string>\"\n },\n \"issue_date\": \"2023-11-07T05:31:56Z\",\n \"buyer\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"invoice_recipient\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"supplier\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"lines\": [\n {\n \"line_number\": \"<string>\",\n \"product_id\": \"<string>\",\n \"product_name\": \"<string>\",\n \"quantity\": 123,\n \"references\": [\n {\n \"identification\": {\n \"vendor_id\": \"<string>\",\n \"pink_id\": \"<string>\"\n },\n \"line_number\": 123\n }\n ],\n \"tax_details\": [\n {\n \"rate\": 123,\n \"amount\": {\n \"amount\": 123\n },\n \"type\": \"<string>\"\n }\n ],\n \"delivery_date\": \"2023-11-07T05:31:56Z\",\n \"free_text\": \"<string>\"\n }\n ],\n \"total_amount\": {\n \"amount\": 123\n },\n \"net_amount\": {\n \"amount\": 123\n },\n \"tax_details\": [\n {\n \"rate\": 123,\n \"amount\": {\n \"amount\": 123\n },\n \"type\": \"<string>\"\n }\n ],\n \"period_start\": \"2023-11-07T05:31:56Z\",\n \"period_end\": \"2023-11-07T05:31:56Z\",\n \"payment_due_date\": \"2023-11-07T05:31:56Z\",\n \"payment_terms\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost/api/invoices")
.header("Content-Type", "application/json")
.body("{\n \"identification\": {\n \"seller\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"buyer\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"pink_id\": \"<string>\",\n \"seller_invoice_id\": \"<string>\"\n },\n \"issue_date\": \"2023-11-07T05:31:56Z\",\n \"buyer\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"invoice_recipient\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"supplier\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"lines\": [\n {\n \"line_number\": \"<string>\",\n \"product_id\": \"<string>\",\n \"product_name\": \"<string>\",\n \"quantity\": 123,\n \"references\": [\n {\n \"identification\": {\n \"vendor_id\": \"<string>\",\n \"pink_id\": \"<string>\"\n },\n \"line_number\": 123\n }\n ],\n \"tax_details\": [\n {\n \"rate\": 123,\n \"amount\": {\n \"amount\": 123\n },\n \"type\": \"<string>\"\n }\n ],\n \"delivery_date\": \"2023-11-07T05:31:56Z\",\n \"free_text\": \"<string>\"\n }\n ],\n \"total_amount\": {\n \"amount\": 123\n },\n \"net_amount\": {\n \"amount\": 123\n },\n \"tax_details\": [\n {\n \"rate\": 123,\n \"amount\": {\n \"amount\": 123\n },\n \"type\": \"<string>\"\n }\n ],\n \"period_start\": \"2023-11-07T05:31:56Z\",\n \"period_end\": \"2023-11-07T05:31:56Z\",\n \"payment_due_date\": \"2023-11-07T05:31:56Z\",\n \"payment_terms\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/api/invoices")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"identification\": {\n \"seller\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"buyer\": {\n \"pink_id\": \"<string>\",\n \"gln\": \"<string>\"\n },\n \"pink_id\": \"<string>\",\n \"seller_invoice_id\": \"<string>\"\n },\n \"issue_date\": \"2023-11-07T05:31:56Z\",\n \"buyer\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"invoice_recipient\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"supplier\": {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"line2\": \"<string>\"\n },\n \"identification\": {\n \"gln\": \"<string>\",\n \"tax_id\": \"<string>\"\n }\n },\n \"lines\": [\n {\n \"line_number\": \"<string>\",\n \"product_id\": \"<string>\",\n \"product_name\": \"<string>\",\n \"quantity\": 123,\n \"references\": [\n {\n \"identification\": {\n \"vendor_id\": \"<string>\",\n \"pink_id\": \"<string>\"\n },\n \"line_number\": 123\n }\n ],\n \"tax_details\": [\n {\n \"rate\": 123,\n \"amount\": {\n \"amount\": 123\n },\n \"type\": \"<string>\"\n }\n ],\n \"delivery_date\": \"2023-11-07T05:31:56Z\",\n \"free_text\": \"<string>\"\n }\n ],\n \"total_amount\": {\n \"amount\": 123\n },\n \"net_amount\": {\n \"amount\": 123\n },\n \"tax_details\": [\n {\n \"rate\": 123,\n \"amount\": {\n \"amount\": 123\n },\n \"type\": \"<string>\"\n }\n ],\n \"period_start\": \"2023-11-07T05:31:56Z\",\n \"period_end\": \"2023-11-07T05:31:56Z\",\n \"payment_due_date\": \"2023-11-07T05:31:56Z\",\n \"payment_terms\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Invoice created successfully",
"transmission_id": "<string>",
"": "<string>"
}{
"error": "<string>"
}{
"message": "<string>"
}{
"error": "Invalid request data",
"errors": "<string>"
}Body
application/json
Invoice
Invoice identification
Show child attributes
Show child attributes
Invoice date
Available options:
EUR, USD, GBP Buyer information
Show child attributes
Show child attributes
Invoice recipient information
Show child attributes
Show child attributes
Supplier information
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Invoice period start date
Invoice period end date
⌘I