curl --request POST \
--url https://api.fidly.be/delivery-locations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"relation_id": "<string>",
"address": {
"country_code": "<string>",
"street": "<string>",
"street_number": "<string>",
"street2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"province": "<string>"
},
"name": "<string>",
"identifier": "<string>",
"identifier_scheme": "<string>"
}
'import requests
url = "https://api.fidly.be/delivery-locations"
payload = {
"relation_id": "<string>",
"address": {
"country_code": "<string>",
"street": "<string>",
"street_number": "<string>",
"street2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"province": "<string>"
},
"name": "<string>",
"identifier": "<string>",
"identifier_scheme": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
relation_id: '<string>',
address: {
country_code: '<string>',
street: '<string>',
street_number: '<string>',
street2: '<string>',
postal_code: '<string>',
city: '<string>',
province: '<string>'
},
name: '<string>',
identifier: '<string>',
identifier_scheme: '<string>'
})
};
fetch('https://api.fidly.be/delivery-locations', 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 => "https://api.fidly.be/delivery-locations",
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([
'relation_id' => '<string>',
'address' => [
'country_code' => '<string>',
'street' => '<string>',
'street_number' => '<string>',
'street2' => '<string>',
'postal_code' => '<string>',
'city' => '<string>',
'province' => '<string>'
],
'name' => '<string>',
'identifier' => '<string>',
'identifier_scheme' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api.fidly.be/delivery-locations"
payload := strings.NewReader("{\n \"relation_id\": \"<string>\",\n \"address\": {\n \"country_code\": \"<string>\",\n \"street\": \"<string>\",\n \"street_number\": \"<string>\",\n \"street2\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"province\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"identifier_scheme\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("https://api.fidly.be/delivery-locations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"relation_id\": \"<string>\",\n \"address\": {\n \"country_code\": \"<string>\",\n \"street\": \"<string>\",\n \"street_number\": \"<string>\",\n \"street2\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"province\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"identifier_scheme\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fidly.be/delivery-locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"relation_id\": \"<string>\",\n \"address\": {\n \"country_code\": \"<string>\",\n \"street\": \"<string>\",\n \"street_number\": \"<string>\",\n \"street2\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"province\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"identifier_scheme\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"relation_id": "<string>",
"name": "<string>",
"address": {
"street": "<string>",
"street_number": "<string>",
"street2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"province": "<string>",
"country_code": "<string>"
},
"identifier": "<string>",
"identifier_scheme": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create Delivery Location
Save a delivery address on a third party, to reuse it on the documents issued to it.
The country is required, as on any address, and street_number may only be given with a
street. identifier and identifier_scheme go together: a GLN means nothing without the
scheme that says how to read it.
In sandbox mode the body is validated exactly as in live mode but nothing is stored, so the
returned id is not resolvable.
curl --request POST \
--url https://api.fidly.be/delivery-locations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"relation_id": "<string>",
"address": {
"country_code": "<string>",
"street": "<string>",
"street_number": "<string>",
"street2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"province": "<string>"
},
"name": "<string>",
"identifier": "<string>",
"identifier_scheme": "<string>"
}
'import requests
url = "https://api.fidly.be/delivery-locations"
payload = {
"relation_id": "<string>",
"address": {
"country_code": "<string>",
"street": "<string>",
"street_number": "<string>",
"street2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"province": "<string>"
},
"name": "<string>",
"identifier": "<string>",
"identifier_scheme": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
relation_id: '<string>',
address: {
country_code: '<string>',
street: '<string>',
street_number: '<string>',
street2: '<string>',
postal_code: '<string>',
city: '<string>',
province: '<string>'
},
name: '<string>',
identifier: '<string>',
identifier_scheme: '<string>'
})
};
fetch('https://api.fidly.be/delivery-locations', 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 => "https://api.fidly.be/delivery-locations",
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([
'relation_id' => '<string>',
'address' => [
'country_code' => '<string>',
'street' => '<string>',
'street_number' => '<string>',
'street2' => '<string>',
'postal_code' => '<string>',
'city' => '<string>',
'province' => '<string>'
],
'name' => '<string>',
'identifier' => '<string>',
'identifier_scheme' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api.fidly.be/delivery-locations"
payload := strings.NewReader("{\n \"relation_id\": \"<string>\",\n \"address\": {\n \"country_code\": \"<string>\",\n \"street\": \"<string>\",\n \"street_number\": \"<string>\",\n \"street2\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"province\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"identifier_scheme\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("https://api.fidly.be/delivery-locations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"relation_id\": \"<string>\",\n \"address\": {\n \"country_code\": \"<string>\",\n \"street\": \"<string>\",\n \"street_number\": \"<string>\",\n \"street2\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"province\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"identifier_scheme\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fidly.be/delivery-locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"relation_id\": \"<string>\",\n \"address\": {\n \"country_code\": \"<string>\",\n \"street\": \"<string>\",\n \"street_number\": \"<string>\",\n \"street2\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"city\": \"<string>\",\n \"province\": \"<string>\"\n },\n \"name\": \"<string>\",\n \"identifier\": \"<string>\",\n \"identifier_scheme\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"relation_id": "<string>",
"name": "<string>",
"address": {
"street": "<string>",
"street_number": "<string>",
"street2": "<string>",
"postal_code": "<string>",
"city": "<string>",
"province": "<string>",
"country_code": "<string>"
},
"identifier": "<string>",
"identifier_scheme": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
A delivery address to save on a third party.
Opaque identifier of the third party this address belongs to.
36The address itself; the country is required.
Show child attributes
Show child attributes
Label of the location, to tell two addresses of the same third party apart.
100Identifier of the location itself, typically a GLN. Requires identifier_scheme.
304-digit Peppol scheme code, e.g. 0088 for a GLN. Requires identifier.
Response
Successful Response
A delivery address saved on a third party.
Opaque unique identifier of the delivery location.
Opaque identifier of the third party this address belongs to (resolvable via GET /relations/{id}).
Label of the location, e.g. Warehouse Liège.
The address itself.
Show child attributes
Show child attributes
Identifier of the location itself, typically a GLN.
Scheme identifier belongs to — 4-digit Peppol scheme code, e.g. 0088 for a GLN.