Skip to main content
POST
/
issuers
/
{issuer_id}
/
establishments
Create Establishment
curl --request POST \
  --url http://localhost:8000/issuers/{issuer_id}/establishments \
  --header 'Content-Type: application/json' \
  --data '
{
  "address": "Av. Principal 123, Quito, Ecuador",
  "code": "001",
  "name": "Matriz"
}
'
{
  "address": "Av. Principal 123, Quito, Ecuador",
  "code": "001",
  "created_at": "2024-01-01T00:00:00Z",
  "id": "770e8400-e29b-41d4-a716-446655440000",
  "is_active": true,
  "issuer_id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Matriz",
  "tenant_id": "660e8400-e29b-41d4-a716-446655440000",
  "updated_at": "2024-01-01T00:00:00Z"
}

Headers

authorization
string | null
x-api-key
string | null
x-tenant-id
string | null

Path Parameters

issuer_id
string<uuid>
required

Cookies

factio_access_token
string | null

Body

application/json

Schema for creating a new Establishment.

code
string
required

3-digit establishment code (e.g., '001')

Required string length: 3
Pattern: ^\d{3}$
address
string
required

Physical address of the establishment

Minimum string length: 1
name
string | null

Display name for the establishment

Required string length: 1 - 255

Response

Successful Response

Schema for Establishment response.

id
string<uuid>
required
tenant_id
string<uuid>
required
issuer_id
string<uuid>
required
code
string
required
name
string | null
required
address
string
required
is_active
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required