Xenia
  • Introduction
  • Getting Started
  • Authentication
  • Reference
    • Users
      • Invite User
      • Retrieve User
      • Update User
      • Delete User
      • Retrieve All Users
    • Teams
      • ☕Create Team
      • Retrieve Team
      • Update Team
      • Delete Team
      • Retrieve All Teams
    • Locations
      • Create Location
      • Retrieve Location
      • Update Location
      • Delete Location
      • Retrieve All Locations
    • Templates
      • Retrieve Template
      • Archive Template
      • Mange Template Access
    • Submissions
      • Retrieve Submission
      • Search Submissions
      • Download Submission Report
      • Delete Submission
    • Requests
      • Create Request
      • Retrieve Request
      • Delete Request
    • Folders
      • Create Folder
      • Retrieve Folder
      • Update Folder
      • Delete Folder
      • Retrieve All Folders
Powered by GitBook
On this page
  • Get your API keys
  • Install the library
  • Make your first request
  • Create a new location

Getting Started

Getting started with Xenia's API

Get your API keys

Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.

You can generate an API key from your Dashboard at any time.

Install the library

The best way to interact with our API is to use one of our official libraries:

# Install via NPM
npm install --save xenia
# Install via pip
pip install --upgrade xenia

Make your first request

To make your first request, send an authenticated request to the pets endpoint. This will create a pet, which is nice.

Create a new location

POST https://api.xenia.team/v1/locations

Create new location

Headers

Name
Type
Description

Authorization*

JWT Token

Access token

Request Body

Name
Type
Description

name*

string

The name of location

description

string

parentId

string

id of parent location

{
    "id": "e77b6442-de60-401c-a173-0afc84a5747e",
    "name": "Main Branch",
    "description": "",
    "parentId": "",
    "createdAt": 1701743645
    "updatedAt": 2001743645
}

Take a look at how you might call this method using our official libraries, or via curl:

curl https://api.xenia.com/v1/locations  
    -u YOUR_API_KEY:  
    -d name='Hightstreet Branch'  
// require the xenia module and set it up with your API key
const xenia = require('xenia')(YOUR_API_KEY);

const newLocation = await xenia.location.create({
    name: 'Hightstreet Branch',
})
// Set your API key before making the request
xenia.api_key = YOUR_API_KEY

xenia.Location.create(
    name='Hightstreet Branch'
)
PreviousIntroductionNextAuthentication

Last updated 1 year ago