Check order
curl --request POST \
--url https://staging-v2.sparqle.tech/orders/check/{locationId} \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"deliveryAddress": {
"street": "Gustav Mahlerlaan",
"houseNumber": "320",
"postalCode": "1082 ME",
"countryCode": "NL",
"suffix": "",
"city": "Amsterdam"
},
"dimensions": {
"length": 200,
"width": 75,
"height": 50
},
"weight": 1500,
"signature": false,
"notAtNeighbour": false
}
'import requests
url = "https://staging-v2.sparqle.tech/orders/check/{locationId}"
payload = {
"deliveryAddress": {
"street": "Gustav Mahlerlaan",
"houseNumber": "320",
"postalCode": "1082 ME",
"countryCode": "NL",
"suffix": "",
"city": "Amsterdam"
},
"dimensions": {
"length": 200,
"width": 75,
"height": 50
},
"weight": 1500,
"signature": False,
"notAtNeighbour": False
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
deliveryAddress: {
street: 'Gustav Mahlerlaan',
houseNumber: '320',
postalCode: '1082 ME',
countryCode: 'NL',
suffix: '',
city: 'Amsterdam'
},
dimensions: {length: 200, width: 75, height: 50},
weight: 1500,
signature: false,
notAtNeighbour: false
})
};
fetch('https://staging-v2.sparqle.tech/orders/check/{locationId}', 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://staging-v2.sparqle.tech/orders/check/{locationId}",
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([
'deliveryAddress' => [
'street' => 'Gustav Mahlerlaan',
'houseNumber' => '320',
'postalCode' => '1082 ME',
'countryCode' => 'NL',
'suffix' => '',
'city' => 'Amsterdam'
],
'dimensions' => [
'length' => 200,
'width' => 75,
'height' => 50
],
'weight' => 1500,
'signature' => false,
'notAtNeighbour' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$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://staging-v2.sparqle.tech/orders/check/{locationId}"
payload := strings.NewReader("{\n \"deliveryAddress\": {\n \"street\": \"Gustav Mahlerlaan\",\n \"houseNumber\": \"320\",\n \"postalCode\": \"1082 ME\",\n \"countryCode\": \"NL\",\n \"suffix\": \"\",\n \"city\": \"Amsterdam\"\n },\n \"dimensions\": {\n \"length\": 200,\n \"width\": 75,\n \"height\": 50\n },\n \"weight\": 1500,\n \"signature\": false,\n \"notAtNeighbour\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
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://staging-v2.sparqle.tech/orders/check/{locationId}")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"deliveryAddress\": {\n \"street\": \"Gustav Mahlerlaan\",\n \"houseNumber\": \"320\",\n \"postalCode\": \"1082 ME\",\n \"countryCode\": \"NL\",\n \"suffix\": \"\",\n \"city\": \"Amsterdam\"\n },\n \"dimensions\": {\n \"length\": 200,\n \"width\": 75,\n \"height\": 50\n },\n \"weight\": 1500,\n \"signature\": false,\n \"notAtNeighbour\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-v2.sparqle.tech/orders/check/{locationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"deliveryAddress\": {\n \"street\": \"Gustav Mahlerlaan\",\n \"houseNumber\": \"320\",\n \"postalCode\": \"1082 ME\",\n \"countryCode\": \"NL\",\n \"suffix\": \"\",\n \"city\": \"Amsterdam\"\n },\n \"dimensions\": {\n \"length\": 200,\n \"width\": 75,\n \"height\": 50\n },\n \"weight\": 1500,\n \"signature\": false,\n \"notAtNeighbour\": false\n}"
response = http.request(request)
puts response.read_body{
"deliverable": true,
"resolvedAddress": {
"street": "Gustav Mahlerlaan",
"houseNumber": "320",
"suffix": "",
"postalCode": "1082 ME",
"city": "Amsterdam",
"countryCode": "NL",
"coordinates": {
"lng": 4.8721,
"lat": 52.3382
}
},
"reason": "OUT_OF_AREA",
"missingCapabilities": {
"signature": true,
"mailbox": true,
"notAtNeighbour": true
}
}{
"statusCode": 400,
"message": [
"deliveryName should not be empty"
],
"error": "Bad Request"
}API Reference
Check order
Validate a delivery address and serviceability for a location before creating an order.
POST
/
orders
/
check
/
{locationId}
Check order
curl --request POST \
--url https://staging-v2.sparqle.tech/orders/check/{locationId} \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"deliveryAddress": {
"street": "Gustav Mahlerlaan",
"houseNumber": "320",
"postalCode": "1082 ME",
"countryCode": "NL",
"suffix": "",
"city": "Amsterdam"
},
"dimensions": {
"length": 200,
"width": 75,
"height": 50
},
"weight": 1500,
"signature": false,
"notAtNeighbour": false
}
'import requests
url = "https://staging-v2.sparqle.tech/orders/check/{locationId}"
payload = {
"deliveryAddress": {
"street": "Gustav Mahlerlaan",
"houseNumber": "320",
"postalCode": "1082 ME",
"countryCode": "NL",
"suffix": "",
"city": "Amsterdam"
},
"dimensions": {
"length": 200,
"width": 75,
"height": 50
},
"weight": 1500,
"signature": False,
"notAtNeighbour": False
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
deliveryAddress: {
street: 'Gustav Mahlerlaan',
houseNumber: '320',
postalCode: '1082 ME',
countryCode: 'NL',
suffix: '',
city: 'Amsterdam'
},
dimensions: {length: 200, width: 75, height: 50},
weight: 1500,
signature: false,
notAtNeighbour: false
})
};
fetch('https://staging-v2.sparqle.tech/orders/check/{locationId}', 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://staging-v2.sparqle.tech/orders/check/{locationId}",
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([
'deliveryAddress' => [
'street' => 'Gustav Mahlerlaan',
'houseNumber' => '320',
'postalCode' => '1082 ME',
'countryCode' => 'NL',
'suffix' => '',
'city' => 'Amsterdam'
],
'dimensions' => [
'length' => 200,
'width' => 75,
'height' => 50
],
'weight' => 1500,
'signature' => false,
'notAtNeighbour' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$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://staging-v2.sparqle.tech/orders/check/{locationId}"
payload := strings.NewReader("{\n \"deliveryAddress\": {\n \"street\": \"Gustav Mahlerlaan\",\n \"houseNumber\": \"320\",\n \"postalCode\": \"1082 ME\",\n \"countryCode\": \"NL\",\n \"suffix\": \"\",\n \"city\": \"Amsterdam\"\n },\n \"dimensions\": {\n \"length\": 200,\n \"width\": 75,\n \"height\": 50\n },\n \"weight\": 1500,\n \"signature\": false,\n \"notAtNeighbour\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
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://staging-v2.sparqle.tech/orders/check/{locationId}")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"deliveryAddress\": {\n \"street\": \"Gustav Mahlerlaan\",\n \"houseNumber\": \"320\",\n \"postalCode\": \"1082 ME\",\n \"countryCode\": \"NL\",\n \"suffix\": \"\",\n \"city\": \"Amsterdam\"\n },\n \"dimensions\": {\n \"length\": 200,\n \"width\": 75,\n \"height\": 50\n },\n \"weight\": 1500,\n \"signature\": false,\n \"notAtNeighbour\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-v2.sparqle.tech/orders/check/{locationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"deliveryAddress\": {\n \"street\": \"Gustav Mahlerlaan\",\n \"houseNumber\": \"320\",\n \"postalCode\": \"1082 ME\",\n \"countryCode\": \"NL\",\n \"suffix\": \"\",\n \"city\": \"Amsterdam\"\n },\n \"dimensions\": {\n \"length\": 200,\n \"width\": 75,\n \"height\": 50\n },\n \"weight\": 1500,\n \"signature\": false,\n \"notAtNeighbour\": false\n}"
response = http.request(request)
puts response.read_body{
"deliverable": true,
"resolvedAddress": {
"street": "Gustav Mahlerlaan",
"houseNumber": "320",
"suffix": "",
"postalCode": "1082 ME",
"city": "Amsterdam",
"countryCode": "NL",
"coordinates": {
"lng": 4.8721,
"lat": 52.3382
}
},
"reason": "OUT_OF_AREA",
"missingCapabilities": {
"signature": true,
"mailbox": true,
"notAtNeighbour": true
}
}{
"statusCode": 400,
"message": [
"deliveryName should not be empty"
],
"error": "Bad Request"
}Authorizations
Path Parameters
Body
application/json
Show child attributes
Show child attributes
Collo dimensions in mm. Must satisfy length >= width >= height.
Show child attributes
Show child attributes
Weight in grams.
Example:
1500
Delivery requires a signature.
Example:
false
Do not deliver to a neighbour.
Example:
false
Response
Validation result
Whether the address can be served for this location.
Example:
true
The geocoded address the delivery check was performed with. Geocoding may correct the submitted address, so inspect this to confirm what was actually used.
Show child attributes
Show child attributes
Why the address is not deliverable. Only present when deliverable is false.
Example:
"OUT_OF_AREA"
Requested capabilities no carrier could satisfy. Only present when deliverable is false.
Show child attributes
Show child attributes
⌘I