Relay API

Authentication

API Key

Send header "Authorization: Bearer [api-key]" with each request.

Security Scheme Type API Key
parameter name: Authorization

Addresses

CreateAddress

Creates an address

Authorizations:
Request Body schema: application/json
streetAddress
required
string

Street and house number

postalCode
required
string

Postal code / zip code

locality
required
string

City / town

country
required
string

2-letter country code (ISO 3166-1 alpha-2)

additionalInfo
string

Responses

Request samples

Content type
application/json
{
  • "streetAddress": "string",
  • "postalCode": "string",
  • "locality": "string",
  • "country": "string",
  • "additionalInfo": "string"
}

Response samples

Content type
application/json
0

Customers

CreateCustomer

Creates a customer. Can also connect to casavi Tenant

Authorizations:
None
Request Body schema: application/json
casaviAccountId
integer

If provided, the customer will be connected to given casavi tenant. If not, the customer will only exist in relay

required
object

Information about the customer that will be created

Responses

Request samples

Content type
application/json
{
  • "casaviAccountId": 0,
  • "customer": {
    }
}

Response samples

Content type
application/json
{
  • "casaviAccountId": 0,
  • "customer": {
    }
}

GetCustomers

Get all customers from your account

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "customers": [
    ]
}

Properties

CreateProperties

Creates or Updates one or multiple Properties.

Authorizations:
None
Request Body schema: application/json
casaviAccountId
number
required
Array of objects (PropertyApiDefinition) [ items ]

Responses

Request samples

Content type
application/json
{
  • "casaviAccountId": 0,
  • "properties": [
    ]
}

Response samples

Content type
application/json
{
  • "properties": [
    ]
}

GetProperties

Gets properties by accountId

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "properties": [
    ]
}

DeleteProperty

Delete Property by Id

Authorizations:
None
path Parameters
propertyId
required
number

Responses

GetProperty

Get Property by Id

Authorizations:
None
path Parameters
propertyId
required
number

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "externalId": 0,
  • "customerId": 0,
  • "origin": "string",
  • "address": {
    },
  • "mscNumber": "string",
  • "createdAt": "string",
  • "updatedAt": "string"
}

Orders

GetOrderById

Gets one specific order by ID

Authorizations:
path Parameters
orderId
required
number

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "title": "string",
  • "status": "OPEN",
  • "address": {
    },
  • "dueDate": "string",
  • "followUpDate": "string",
  • "createdAt": "string",
  • "updatedAt": "string",
  • "internalId": "string",
  • "isInternal": true,
  • "type": "string",
  • "taskId": "string",
  • "fields": [
    ],
  • "attachments": [
    ],
  • "comments": [
    ],
  • "contactPersons": [
    ],
  • "customerId": 0
}

PatchOrder

Patches an order

Authorizations:
path Parameters
orderId
required
number
Request Body schema: application/json
status
string
Enum: "OPEN" "IN_PROGRESS" "FINISHED" "DECLINED" "NULL" "PREPARE"
dueDate
string <date-time>
internalId
string
object (ApiAddress)

Responses

Request samples

Content type
application/json
{
  • "status": "OPEN",
  • "dueDate": "2019-08-24T14:15:22Z",
  • "internalId": "string",
  • "address": {
    }
}

Response samples

Content type
application/json
0

CreateOrder

Creates an order

Authorizations:
Request Body schema: multipart/form-data
required
object

This is expected as string in form data (stringified json)

files
Array of arrays[ items ]

A maximum of 10 files and 100 MB

Responses

Response samples

Content type
application/json
{
  • "id": 0
}

GetAllOrders

Gets all orders for one account

Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

GetOrderCommentsByOrderId

Gets all comments related to one order

Authorizations:
path Parameters
orderId
required
number

Responses

Response samples

Content type
application/json
[
  • {
    }
]

CreateOrderComment

Creates an order comment

Authorizations:
path Parameters
orderId
required
number
Request Body schema: multipart/form-data
text
required
string
authorName
required
string
files
Array of arrays[ items ]

A maximum of 10 files and 100 MB

Responses

Response samples

Content type
application/json
{
  • "id": 0
}

OrderFields

CreateOrderField

Creates an order-field

Authorizations:
Request Body schema: application/json
name
required
string
content
required
string
position
required
number
orderId
required
number

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "content": "string",
  • "position": 0,
  • "orderId": 0
}

Response samples

Content type
application/json
0

OrderContactPersons

CreateOrderContactPerson

Creates a contact person for a specific order

Authorizations:
Request Body schema: application/json
name
required
string
type
required
string
telephone
string
mobile
string
email
required
string
orderId
required
number

Responses