Create shipping address
curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address_1": "456 Warehouse Blvd",
"city": "Austin",
"state": "TX",
"country": "USA",
"zip": "78745",
"address_2": "Building 2",
"first_name": "John",
"last_name": "Doe",
"email": "shipping@acmecorp.com",
"phone": "555-987-6543",
"is_default": true
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses"
payload = {
"address_1": "456 Warehouse Blvd",
"city": "Austin",
"state": "TX",
"country": "USA",
"zip": "78745",
"address_2": "Building 2",
"first_name": "John",
"last_name": "Doe",
"email": "shipping@acmecorp.com",
"phone": "555-987-6543",
"is_default": True
}
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({
address_1: '456 Warehouse Blvd',
city: 'Austin',
state: 'TX',
country: 'USA',
zip: '78745',
address_2: 'Building 2',
first_name: 'John',
last_name: 'Doe',
email: 'shipping@acmecorp.com',
phone: '555-987-6543',
is_default: true
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses', 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://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses",
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([
'address_1' => '456 Warehouse Blvd',
'city' => 'Austin',
'state' => 'TX',
'country' => 'USA',
'zip' => '78745',
'address_2' => 'Building 2',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'shipping@acmecorp.com',
'phone' => '555-987-6543',
'is_default' => true
]),
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://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses"
payload := strings.NewReader("{\n \"address_1\": \"456 Warehouse Blvd\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"country\": \"USA\",\n \"zip\": \"78745\",\n \"address_2\": \"Building 2\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"shipping@acmecorp.com\",\n \"phone\": \"555-987-6543\",\n \"is_default\": true\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://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address_1\": \"456 Warehouse Blvd\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"country\": \"USA\",\n \"zip\": \"78745\",\n \"address_2\": \"Building 2\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"shipping@acmecorp.com\",\n \"phone\": \"555-987-6543\",\n \"is_default\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses")
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 \"address_1\": \"456 Warehouse Blvd\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"country\": \"USA\",\n \"zip\": \"78745\",\n \"address_2\": \"Building 2\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"shipping@acmecorp.com\",\n \"phone\": \"555-987-6543\",\n \"is_default\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 789,
"company_id": 123456,
"address": "456 Warehouse Blvd",
"city": "Austin",
"state": "TX",
"postal_code": "78745",
"country": "USA",
"created_at": "2023-03-15T14:30:00Z",
"updated_at": "2023-03-15T14:30:00Z",
"company_name": "Acme Corporation",
"address_line_2": "Building 2",
"full_address": "456 Warehouse Blvd, Building 2, Austin, TX 78745, USA",
"full_name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"phone": "555-987-6543",
"email": "shipping@acmecorp.com",
"is_default": true
}
}{
"error": "Unauthorized",
"message": "Authentication credentials are missing or invalid",
"status_code": 401
}{
"error": "Forbidden",
"message": "You do not have permission to access this resource",
"status_code": 403
}{
"error": "Not Found",
"message": "The requested resource could not be found",
"status_code": 404
}{
"message": "<string>",
"errors": {}
}Companies
Create shipping address
Create a new shipping address for a company
POST
/
companies
/
{companyId}
/
shipping-addresses
Create shipping address
curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address_1": "456 Warehouse Blvd",
"city": "Austin",
"state": "TX",
"country": "USA",
"zip": "78745",
"address_2": "Building 2",
"first_name": "John",
"last_name": "Doe",
"email": "shipping@acmecorp.com",
"phone": "555-987-6543",
"is_default": true
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses"
payload = {
"address_1": "456 Warehouse Blvd",
"city": "Austin",
"state": "TX",
"country": "USA",
"zip": "78745",
"address_2": "Building 2",
"first_name": "John",
"last_name": "Doe",
"email": "shipping@acmecorp.com",
"phone": "555-987-6543",
"is_default": True
}
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({
address_1: '456 Warehouse Blvd',
city: 'Austin',
state: 'TX',
country: 'USA',
zip: '78745',
address_2: 'Building 2',
first_name: 'John',
last_name: 'Doe',
email: 'shipping@acmecorp.com',
phone: '555-987-6543',
is_default: true
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses', 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://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses",
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([
'address_1' => '456 Warehouse Blvd',
'city' => 'Austin',
'state' => 'TX',
'country' => 'USA',
'zip' => '78745',
'address_2' => 'Building 2',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'shipping@acmecorp.com',
'phone' => '555-987-6543',
'is_default' => true
]),
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://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses"
payload := strings.NewReader("{\n \"address_1\": \"456 Warehouse Blvd\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"country\": \"USA\",\n \"zip\": \"78745\",\n \"address_2\": \"Building 2\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"shipping@acmecorp.com\",\n \"phone\": \"555-987-6543\",\n \"is_default\": true\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://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address_1\": \"456 Warehouse Blvd\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"country\": \"USA\",\n \"zip\": \"78745\",\n \"address_2\": \"Building 2\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"shipping@acmecorp.com\",\n \"phone\": \"555-987-6543\",\n \"is_default\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/companies/{companyId}/shipping-addresses")
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 \"address_1\": \"456 Warehouse Blvd\",\n \"city\": \"Austin\",\n \"state\": \"TX\",\n \"country\": \"USA\",\n \"zip\": \"78745\",\n \"address_2\": \"Building 2\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"shipping@acmecorp.com\",\n \"phone\": \"555-987-6543\",\n \"is_default\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 789,
"company_id": 123456,
"address": "456 Warehouse Blvd",
"city": "Austin",
"state": "TX",
"postal_code": "78745",
"country": "USA",
"created_at": "2023-03-15T14:30:00Z",
"updated_at": "2023-03-15T14:30:00Z",
"company_name": "Acme Corporation",
"address_line_2": "Building 2",
"full_address": "456 Warehouse Blvd, Building 2, Austin, TX 78745, USA",
"full_name": "John Doe",
"first_name": "John",
"last_name": "Doe",
"phone": "555-987-6543",
"email": "shipping@acmecorp.com",
"is_default": true
}
}{
"error": "Unauthorized",
"message": "Authentication credentials are missing or invalid",
"status_code": 401
}{
"error": "Forbidden",
"message": "You do not have permission to access this resource",
"status_code": 403
}{
"error": "Not Found",
"message": "The requested resource could not be found",
"status_code": 404
}{
"message": "<string>",
"errors": {}
}Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
Path Parameters
The unique identifier of the company
Body
application/json
Street address
Maximum string length:
255Example:
"456 Warehouse Blvd"
City
Maximum string length:
255Example:
"Austin"
State/province
Maximum string length:
255Example:
"TX"
Country
Maximum string length:
255Example:
"USA"
Postal/ZIP code
Maximum string length:
255Example:
"78745"
Additional address information
Maximum string length:
255Example:
"Building 2"
First name of the contact person
Maximum string length:
255Example:
"John"
Last name of the contact person
Maximum string length:
255Example:
"Doe"
Email address
Maximum string length:
255Example:
"shipping@acmecorp.com"
Phone number
Maximum string length:
255Example:
"555-987-6543"
Whether this is the default shipping address. If set to true, all other shipping addresses for this company will be set to non-default.
Example:
true
Response
Shipping address successfully created
Show child attributes
Show child attributes
⌘I