Skip to main content
POST
/
v3
/
profiles
/
{profile}
/
addresses
Add Profile Address
curl --request POST \
  --url https://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/addresses \
  --header 'Content-Type: application/json' \
  --data '
{
  "address_line_1": "<string>",
  "city": "<string>",
  "postcode": "<string>",
  "country": "<string>",
  "address_line_2": "<string>",
  "address_line_3": "<string>",
  "company": "<string>",
  "state": "<string>",
  "notes": "<string>",
  "is_default": true,
  "external_id": "<string>",
  "meta": [
    "<string>"
  ],
  "name": "<string>",
  "phone": "<string>",
  "iso": "<string>",
  "iso_state": "<string>",
  "custom_fields": [
    {
      "namespace": "<string>",
      "handle": "<string>",
      "value": "<string>"
    }
  ]
}
'
import requests

url = "https://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/addresses"

payload = {
"address_line_1": "<string>",
"city": "<string>",
"postcode": "<string>",
"country": "<string>",
"address_line_2": "<string>",
"address_line_3": "<string>",
"company": "<string>",
"state": "<string>",
"notes": "<string>",
"is_default": True,
"external_id": "<string>",
"meta": ["<string>"],
"name": "<string>",
"phone": "<string>",
"iso": "<string>",
"iso_state": "<string>",
"custom_fields": [
{
"namespace": "<string>",
"handle": "<string>",
"value": "<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({
address_line_1: '<string>',
city: '<string>',
postcode: '<string>',
country: '<string>',
address_line_2: '<string>',
address_line_3: '<string>',
company: '<string>',
state: '<string>',
notes: '<string>',
is_default: true,
external_id: '<string>',
meta: ['<string>'],
name: '<string>',
phone: '<string>',
iso: '<string>',
iso_state: '<string>',
custom_fields: [{namespace: '<string>', handle: '<string>', value: '<string>'}]
})
};

fetch('https://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/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://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/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_line_1' => '<string>',
'city' => '<string>',
'postcode' => '<string>',
'country' => '<string>',
'address_line_2' => '<string>',
'address_line_3' => '<string>',
'company' => '<string>',
'state' => '<string>',
'notes' => '<string>',
'is_default' => true,
'external_id' => '<string>',
'meta' => [
'<string>'
],
'name' => '<string>',
'phone' => '<string>',
'iso' => '<string>',
'iso_state' => '<string>',
'custom_fields' => [
[
'namespace' => '<string>',
'handle' => '<string>',
'value' => '<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 := "https://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/addresses"

payload := strings.NewReader("{\n \"address_line_1\": \"<string>\",\n \"city\": \"<string>\",\n \"postcode\": \"<string>\",\n \"country\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"address_line_3\": \"<string>\",\n \"company\": \"<string>\",\n \"state\": \"<string>\",\n \"notes\": \"<string>\",\n \"is_default\": true,\n \"external_id\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"iso\": \"<string>\",\n \"iso_state\": \"<string>\",\n \"custom_fields\": [\n {\n \"namespace\": \"<string>\",\n \"handle\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\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("https://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/addresses")
.header("Content-Type", "application/json")
.body("{\n \"address_line_1\": \"<string>\",\n \"city\": \"<string>\",\n \"postcode\": \"<string>\",\n \"country\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"address_line_3\": \"<string>\",\n \"company\": \"<string>\",\n \"state\": \"<string>\",\n \"notes\": \"<string>\",\n \"is_default\": true,\n \"external_id\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"iso\": \"<string>\",\n \"iso_state\": \"<string>\",\n \"custom_fields\": [\n {\n \"namespace\": \"<string>\",\n \"handle\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.{tenant}.getomneo.com/api/v3/profiles/{profile}/addresses")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"address_line_1\": \"<string>\",\n \"city\": \"<string>\",\n \"postcode\": \"<string>\",\n \"country\": \"<string>\",\n \"address_line_2\": \"<string>\",\n \"address_line_3\": \"<string>\",\n \"company\": \"<string>\",\n \"state\": \"<string>\",\n \"notes\": \"<string>\",\n \"is_default\": true,\n \"external_id\": \"<string>\",\n \"meta\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"iso\": \"<string>\",\n \"iso_state\": \"<string>\",\n \"custom_fields\": [\n {\n \"namespace\": \"<string>\",\n \"handle\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": 123,
    "address_line_1": "<string>",
    "address_line_2": "<string>",
    "address_line_3": "<string>",
    "company": "<string>",
    "latitude": 123,
    "longitude": 123,
    "city": "<string>",
    "postcode": "<string>",
    "state": "<string>",
    "country": "<string>",
    "notes": "<string>",
    "external_id": "<string>",
    "is_default": true,
    "created_at": "<string>",
    "updated_at": "<string>",
    "meta": [
      "<unknown>"
    ],
    "name": "<string>",
    "type": "<string>",
    "phone": "<string>",
    "iso": "<string>",
    "iso_state": "<string>",
    "profile_id": "<string>",
    "custom_fields": {}
  }
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>"
}
{
"message": "<string>",
"errors": {}
}

Path Parameters

profile
string<uuid>
required

The profile ID

Body

application/json
address_line_1
string
required
city
string
required
postcode
string
required
country
string
required
address_line_2
string | null
address_line_3
string | null
company
string | null
state
string
notes
string | null
is_default
boolean | null
external_id
string | null
meta
string[] | null
name
string | null
type
enum<string> | null
Available options:
home,
business,
billing,
holiday,
hotel,
recipient,
other
phone
string | null
iso
string | null
Required string length: 2
iso_state
string | null
Required string length: 1 - 3
custom_fields
object[]

Response

Address

data
Address · object
required