Skip to main content
POST
/
v1
/
organizations
/
{organization_id}
/
locations
Create a location in an organization
curl --request POST \
  --url https://api.chataigne.ai/v1/organizations/{organization_id}/locations \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "currency": "EUR",
  "country": "FR",
  "timezone": "Europe/Paris",
  "address": {
    "line1": "1 Rue de Rivoli",
    "postal_code": "75001",
    "city": "Paris",
    "country": "FR",
    "latitude": 48.8566,
    "longitude": 2.3522,
    "line2": "<string>"
  },
  "default_language": "<string>",
  "contact_information": "<string>"
}
'
{
  "id": "loc_023d6847de544fdb9a5510db",
  "object": "location",
  "organization_id": "<string>",
  "name": "Pokawa Châtelet",
  "currency": "EUR",
  "country": "FR",
  "timezone": "Europe/Paris",
  "default_language": "fr",
  "address": {
    "line1": "<string>",
    "line2": "<string>",
    "postal_code": "<string>",
    "city": "<string>",
    "country": "<string>",
    "latitude": 123,
    "longitude": 123
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

Location/organization API key.

Headers

Idempotency-Key
string
required

Unique key that makes this create safe to retry; replays return the original response.

Path Parameters

organization_id
string
required

Body

application/json
name
string
required
currency
string
required
Example:

"EUR"

country
string
required
Example:

"FR"

timezone
string
required
Example:

"Europe/Paris"

address
object
required
default_language
string
contact_information
string

Response

The created location.

id
string
Example:

"loc_023d6847de544fdb9a5510db"

object
enum<string>
Available options:
location
organization_id
string | null
name
string
Example:

"Pokawa Châtelet"

currency
string
Example:

"EUR"

country
string
Example:

"FR"

timezone
string
Example:

"Europe/Paris"

default_language
string
Example:

"fr"

address
object | null
created_at
string<date-time>
updated_at
string<date-time>