NAV
shell

CCUBE API Reference

Overview

Base URLs: - Production: https://{tenant-subdomain}.inc.construction Replace {tenant-subdomain} with your tenant subdomain provided by CCUBE.

Authentication

To authenticate, use this endpoint:

POST https://{tenant-subdomain}.inc.construction/users/sign_in

curl -X POST "https://{tenant-subdomain}.inc.construction/users/sign_in" \
  -H "Content-Type: application/json" \
  -d '{
    "user": {
      "email": "your.email@example.com",
      "password": "your_password"
    }
  }'



```shell
# Success Response (200 OK):
{
  "user_token": "generated_token",
  "user_email": "your_email@example.com",
  "email": "your_email@example.com",
  "user_id": 1,
  "user_contact_id": 1
}

All subsequent API requests must include the authentication header:

Authorization: Token YourToken,user_email=your.email@example.com

Users

Get All Users

**shell curl "https://{tenant-subdomain}.inc.construction/api/v2/users" \ -H 'Authorization: Token YourApiToken,user_email=YourEmail'

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "email": "user1@example.com",
    "role": "admin",
    "name": "User One",
    "suspended": false,
    "current_sign_in_at": "2023-10-01T12:00:00Z",
    "last_sign_in_at": "2023-09-30T12:00:00Z",
    "given_name": "User",
    "family_name": "One"
  },
  {
    "id": 2,
    "email": "user2@example.com",
    "role": "user",
    "name": "User Two",
    "suspended": false,
    "current_sign_in_at": "2023-10-01T12:00:00Z",
    "last_sign_in_at": "2023-09-30T12:00:00Z",
    "given_name": "User",
    "family_name": "Two"
  }
]

This endpoint retrieves all Users.

HTTP Request

GET https://{tenant-subdomain}.inc.construction/api/v2/users

Query Parameters

Pagination

⚠️ Coming Soon

Parameter Default Description
page 1 you can specify which page to get
per_page 20 number of results per page

Get Specific User

This endpoint retrieves a specific User.

HTTP Request

GET https://{tenant-subdomain}.inc.construction/api/v2/users/ID>

URL Parameters

Parameter Description
ID The ID of the User to retrieve
curl "https://{tenant-subdomain}.inc.construction/api/v2/users/1" \
  -H 'Authorization: Token YourApiToken,user_email=YourEmail'

The above command returns JSON structured like this:

{
  "id": 1,
  "email": "user1@example.com",
  "role": "admin",
  "name": "User One",
  "suspended": false,
  "current_sign_in_at": "2023-10-01T12:00:00Z",
  "last_sign_in_at": "2023-09-30T12:00:00Z",
  "given_name": "User",
  "family_name": "One"
}

Create a New User

This endpoint to create a new User.

HTTP Request

POST https://{tenant-subdomain}.inc.construction/api/v2/users>

URL Parameters

Parameter Description
ID The ID of the User to retrieve
curl 'https://{tenant-subdomain}.inc.construction/api/v2/users' -X POST \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json' \
--data-raw '{
  "user": {
    "email": "newuser@example.com",       // Required: User's email address
    "password": "password123",            // Required: User's password (min 8 chars)
    "password_confirmation": "password123", // Required: Must match password
    "user_type": "full",                  // Required: Either "full" or "limited"
    "contact_id": "1234",                 // Optional: Associated contact ID
    "role_ids": ["1"],                    // Required: Array of role IDs
    "given_name": "John",                 // Optional: User's first name
    "family_name": "Doe",                 // Optional: User's last name
    "suspended": false,                   // Optional: Account status (default: false)
    "super_user": false,                  // Optional: Super user status (default: false)
    "paid_tenant": false,                 // Optional: Paid tenant status
    "dunning_tenant": false,              // Optional: Dunning status
    "trial": false,                       // Optional: Trial status
    "demo": false,                        // Optional: Demo account status
    "paid_user": false                    // Optional: Paid user status
  }
}'

The above command returns JSON structured like this:

{
  "id": 3,
  "email": "newuser@example.com",
  "role": "user",
  "name": "New User",
  "suspended": false,
  "current_sign_in_at": "2023-10-01T12:00:00Z",
  "last_sign_in_at": "2023-09-30T12:00:00Z",
  "given_name": "New",
  "family_name": "User"
}

Delete a User

This endpoint deletes a specific User.

HTTP Request

DELETE https://{tenant-subdomain}.inc.construction/api/v2/users/{id}

URL Parameters

Parameter Description
ID The ID of the User to retrieve
curl 'https://{tenant-subdomain}.inc.construction/api/v2/users/{id}' -X DELETE \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json'

The above command returns JSON structured like this:

{"message": "User deleted successfully"}

Update a User

Endpoint: PUT /api/v2/users/{id}

Description: This endpoint updates an existing user’s details by their ID.

CURL Request

curl 'https://{tenant-subdomain}.inc.construction/api/v2/users/{id}' -X PUT \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json' \
--data-raw '{
  "user": {
    "email": "updated@example.com",        // Optional: New email address
    "given_name": "John",                  // Optional: Update first name
    "family_name": "Doe",                  // Optional: Update last name
    "suspended": false,                    // Optional: Update account status
    "user_type": "full",                  // Optional: Update user type
    "contact_id": "1234",                 // Optional: Update contact association
    "role_ids": ["1"]                     // Optional: Update role assignments
  }
}'

The above command returns JSON structured like this:

{
  "id": 1,
  "email": "updatedemail@example.com",
  "role": "admin",
  "name": "John Doe",
  "suspended": false,
  "current_sign_in_at": "2023-10-01T12:00:00Z",
  "last_sign_in_at": "2023-09-30T12:00:00Z",
  "given_name": "John",
  "family_name": "Doe"
}

Projects

Get All Projects

curl "https://{tenant-subdomain}.inc.construction/api/v2/projects" \
  -H 'Authorization: Token YourToken,user_email=YourEmail'

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "name": "Project Name",
    "reference": "REF001",
    "work_start": "2024-01-01T00:00:00Z",
    "work_end": "2024-02-01T00:00:00Z",
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z"
  }
]

This endpoint retrieves all Projects.

HTTP Request

GET https://{tenant-subdomain}.inc.construction/api/v2/projects

Query Parameters

Pagination

⚠️ Coming Soon

Parameter Default Description
page 1 you can specify which page to get
per_page 20 number of results per page

Get Specific Project

This endpoint retrieves a specific Project.

HTTP Request

GET https://{tenant-subdomain}.inc.construction/api/v2/projects/ID

URL Parameters

Parameter Description
ID The ID of the Project to retrieve
curl "https://{tenant-subdomain}.inc.construction/api/v2/projects/1" \
  -H 'Authorization: Token YourApiToken,user_email=YourEmail' 

The above command returns JSON structured like this:

{
  "id": 1,
  "name": "Project One",
  "reference": "REF001",
  "work_start": "2023-10-01T12:00:00Z",
  "work_end": "2023-10-31T12:00:00Z",
  "create_at": "2023-09-01T12:00:00Z",
  "update_at": "2023-09-15T12:00:00Z"
}

Create a New Project

This endpoint creates a new Project.

HTTP Request

POST https://{tenant-subdomain}.inc.construction/api/v2/projects

URL Parameters

curl -X POST "https://{tenant-subdomain}.inc.construction/api/v2/projects" \
  -H 'Authorization: Token YourToken,user_email=YourEmail' \
  -H "Content-Type: application/json" \
  -d '{
  "project": {
    "name": "Project Name",           // Required: Project title
    "number": "P-001",               // Required: Unique project number
    "client_id": 1,                  // Required: Associated client
    "manager_id": 1,                 // Required: Project manager
    "work_start": "2024-01-01",      // Optional: Project start date
    "work_end": "2024-12-31"         // Optional: Project end date
  }
}'

The above command returns JSON structured like this:

{
  "id": 1,
  "name": "project 1"
}

Delete a Project

This endpoint deletes a specific Project.

HTTP Request

DELETE https://{tenant-subdomain}.inc.construction/api/v2/projects/{id}

URL Parameters

curl 'https://{tenant-subdomain}.inc.construction/api/v2/projects/{id}' -X DELETE \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json'

The above command returns JSON structured like this:

{
  "message": "Project deleted"
}

Update a Project

Endpoint: PUT /api/v2/projects/{id}

Description: This endpoint updates an existing project's details by ID.

CURL Request

curl 'https://{tenant-subdomain}.inc.construction/api/v2/projects/{id}' -X PUT \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json' \
--data-raw '{
"project": {
    "name": "Updated Project",
    "number": "P-001",
    "client_id": 1,
    "created_by_id": 1,
    "manager_id": 1
  }
}'

The above command returns JSON structured like this:

{
  "id": 1,
  "name": "project 1",
  "number": "23",
  "updated_at": "2024-08-28T19:27:32.094-04:00"
}

Quotes

Get All Quotes

GET /api/v2/quotes shell curl "https://{tenant-subdomain}.inc.construction/api/v2/quotes" \ -H 'Authorization: Token YourToken,user_email=YourEmail'

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "number": "Q-001",
    "description": "Quote description",
    "terms": "Payment terms",
    "title": "Quote title"
  }
]

This endpoint retrieves all Quotes.

HTTP Request

GET https://{tenant-subdomain}.inc.construction/api/v2/quotes

### Query Parameters

Pagination

⚠️ Coming Soon

Parameter Default Description
page 1 you can specify which page to get
per_page 20 number of results per page

Get Specific Quote

This endpoint retrieves a specific Quote.

HTTP Request

GET https://{tenant-subdomain}.inc.construction/api/v2/quotes/ID>

URL Parameters

Parameter Description
ID The ID of the Quote to retrieve
curl "https://{tenant-subdomain}.inc.construction/api/v2/quotes/1" \
  -H 'Authorization: Token YourApiToken,user_email=YourEmail'

The above command returns JSON structured like this:

{
  "id": 4,
  "number": "1002"
}

Create a New Quote

This endpoint to create a new Quote.

HTTP Request

POST https://{tenant-subdomain}.inc.construction/api/v2/quotes

URL Parameters

POST /api/v2/quotes



curl -X POST "https://{tenant-subdomain}.inc.construction/api/v2/quotes" \
  -H 'Authorization: Token YourToken,user_email=YourEmail' \
  -H "Content-Type: application/json" \
  -d '{
  "quote": {
    "number": "Q-001",              // Required: Quote number
    "description": "Description",    // Optional: Quote details
    "project_id": 1,                // Required: Associated project
    "department_id": 1,             // Required: Department
    "quote_type": "standard",       // Required: Quote type
    "terms": "Payment terms",       // Optional: Quote terms
    "title": "Quote title"         // Optional: Quote title
  }
}'

The above command returns JSON structured like this:

[
  {
    "id": 36,
    "number": "1033",
    "description": null,
    "terms": null,
    "title": null
  },
  {
    "id": 14,
    "number": "1012",
    "description": null,
    "terms": null,
    "title": null
  }
]

Delete a Quote

This endpoint deletes a specific Quote.

HTTP Request

DELETE https://{tenant-subdomain}.inc.construction/api/v2/quotes/{id}

URL Parameters

curl 'https://{tenant-subdomain}.inc.construction/api/v2/quotes/{id}' -X DELETE \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json'

The above command returns JSON structured like this:

{"message": "Quote deleted successfully"}

Update a Quote

Endpoint: PUT /api/v2/quotes/{id}

Description: This endpoint updates an existing quote's details by ID.

CURL Request

curl 'https://{tenant-subdomain}.inc.construction/api/v2/quotes/{id}' -X PUT \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json' \
--data-raw '{
  "quote": {
    "number": "Q-001",
    "description": "Updated description",
    "project_id": 1,
    "department_id": 1,
    "quote_type": "standard"
  }
}'

The above command returns JSON structured like this:

{
  "id": 164,
  "name": "1154-S1157",
  "description": "roof fix"
}

Invoices

Get All Invoices

GET /api/v2/invoices

curl "https://{tenant-subdomain}.inc.construction/api/v2/invoices" \
  -H 'Authorization: Token YourToken,user_email=YourEmail'

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "subject": "Invoice subject",
    "description": "Invoice description",
    "issue_date": "2024-01-01T00:00:00Z"
  }
]

This endpoint retrieves all Invoices.

HTTP Request

GET https://{tenant-subdomain}.inc.construction/api/v2/invoices

### Query Parameters

Pagination

⚠️ Coming Soon

Parameter Default Description
page 1 you can specify which page to get
per_page 20 number of results per page

Get Specific Invoice

This endpoint retrieves a specific Invoice.

HTTP Request

GET https://{tenant-subdomain}.inc.construction/api/v2/invoices/ID

URL Parameters

Parameter Description
ID The ID of the Invoice to retrieve
curl "https://{tenant-subdomain}.inc.construction/api/v2/invoices/1" \
  -H 'Authorization: Token YourApiToken,user_email=YourEmail'

The above command returns JSON structured like this:

{
  "id": 1,
  "name": "1000"
}

Create a New Invoice

This endpoint creates a new Invoice.

HTTP Request

POST https://{tenant-subdomain}.inc.construction/api/v2/invoices

URL Parameters

curl -X POST "https://{tenant-subdomain}.inc.construction/api/v2/invoices" \
  -H 'Authorization: Token YourToken,user_email=YourEmail' \
  -H "Content-Type: application/json" \
  -d '{
  "invoice": {
    "number": "INV-001",           // Required: Invoice number
    "subject": "Invoice subject",   // Required: Invoice subject
    "description": "Details",       // Optional: Invoice description
    "client_id": 1,                // Required: Client reference
    "project_id": 1,               // Required: Project reference
    "issue_date": "2024-01-01"     // Required: Issue date
  }
}'

The above command returns JSON structured like this:

{
  "id": 67,
  "name": "011"
}

Delete a Invoice

This endpoint deletes a specific Invoice.

HTTP Request

DELETE https://{tenant-subdomain}.inc.construction/api/v2/invoices/{id}

URL Parameters

curl 'https://{tenant-subdomain}.inc.construction/api/v2/invoices/{id}' -X DELETE \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json'

The above command returns JSON structured like this:

{
  "message": "Invoice deleted"
}

Update a Invoice

Endpoint: PUT /api/v2/invoices/{id}

Description: This endpoint updates an existing invoice’s details by ID.

CURL Request

curl 'https://{tenant-subdomain}.inc.construction/api/v2/invoices/{id}' -X PUT \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json' \
--data-raw '{
  "invoice": {
    "number": "INV-001",
    "subject": "Updated subject",
    "client_id": 1,
    "project_id": 1
  }
}'

The above command returns JSON structured like this:

{
  "id": 6,
  "number": "1",
  "subject": "1"
}

Purchase Orders

Get All Purchase Orders

HTTP Request

GET https://{tenant-subdomain}.inc.construction/api/v2/purchase_orders

This endpoint retrieves all Purchase Orders.

Query Parameters

Pagination

⚠️ Coming Soon

Parameter Default Description
page 1 you can specify which page to get
per_page 20 number of results per page
curl "https://{tenant-subdomain}.inc.construction/api/v2/purchase_orders" \
  -H 'Authorization: Token YourApiToken,user_email=YourEmail'

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "number": "1001",
    "description": "Complete kitchen renovation."
  },
  {
    "id": 2,
    "number": "1002",
    "description": "Bathroom remodeling."
  }
]

Get Specific Purchase Order

This endpoint retrieves a specific Purchase Order.

HTTP Request

GET https://{tenant-subdomain}.inc.construction/api/v2/purchase_orders/ID

URL Parameters

Parameter Description
ID The ID of the Purchase order to retrieve
curl "https://{tenant-subdomain}.inc.construction/api/v2/purchase_orders/1" \
  -H 'Authorization: Token YourApiToken,user_email=YourEmail'

The above command returns JSON structured like this:

{
  "id": 1,
  "number": "1011"
}

Create a New Purchase Order

This endpoint to create a new Purchase Order.

HTTP Request

POST https://{tenant-subdomain}.inc.construction/api/v2/purchase_orders

URL Parameters

curl 'https://{tenant-subdomain}.inc.construction/api/v2/purchase_orders' -X POST \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json' \
--data-raw '{
   "purchase_order": {
    "number": "PO-001",
    "description": "Purchase order description",
    "department_id": 1
    }
}'

The above command returns JSON structured like this:

{
  "id": 1,
  "number": "1011"
}

Delete a Purchase Order

This endpoint deletes a specific Purchase Order.

HTTP Request

DELETE https://{tenant-subdomain}.inc.construction/api/v2/purchase_orders/{id}

URL Parameters

curl 'https://{tenant-subdomain}.inc.construction/api/v2/purchase_orders/{id}' -X DELETE \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json'

The above command returns JSON structured like this:

{
  "id": 1,
  "number": "1011"
}

Update a Purchase Order

Endpoint: PUT /api/v2/purchase_orders/{id}

Description: This endpoint updates an existing purchase order's details by ID.

CURL Request

curl 'https://{tenant-subdomain}.inc.construction/api/v2/purchase_orders/{id}' -X PUT \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json' \
--data-raw '{
"purchase_order": {
    "number": "PO-001",
    "description": "Updated description",
    "department_id": 1
  }
}'

Work Orders

Get All Work Orders

curl "https://{tenant-subdomain}.inc.construction/api/v2/work_orders" \
  -H 'Authorization: Token YourApiToken,user_email=YourEmail'

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "subject": "Floor installation",
    "description": "Installation of wooden flooring.",
    "issue_date": "2023-10-01T00:00:00Z"
  },
  {
    "id": 2,
    "subject": "Kitchen renovation",
    "description": "Complete kitchen renovation.",
    "issue_date": "2023-10-02T00:00:00Z"
  }
]

This endpoint retrieves all Work Orders.

HTTP Request

GET https://{tenant-subdomain}.inc.construction/api/v2/work_orders

Query Parameters

Pagination

⚠️ Coming Soon

Parameter Default Description
page 1 you can specify which page to get
per_page 20 number of results per page

Get Specific Work Order

This endpoint retrieves a specific Work Order.

HTTP Request

GET https://{tenant-subdomain}.inc.construction/api/v2/work_orders/ID

URL Parameters

Parameter Description
ID The ID of the Work order to retrieve
curl "https://{tenant-subdomain}.inc.construction/api/v2/work_orders/1" \
  -H 'Authorization: Token YourApiToken,user_email=YourEmail'

Create a New Work Order

This endpoint to create a new Work Order.

HTTP Request

POST https://{tenant-subdomain}.inc.construction/api/v2/work_orders

URL Parameters

curl 'https://{tenant-subdomain}.inc.construction/api/v2/work_orders' -X POST \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json' \
--data-raw '{
  "work_order": {
    "number": "WO-001",            // Required: Work order number
    "description": "Description",   // Required: Work details
    "department_id": 1,            // Required: Department
    "start_date": "2024-01-01",    // Optional: Start date
    "end_date": "2024-01-31"       // Optional: End date
  }
}'

{
    "id": 1,
    "number": "WO-001",
    "description": "Work order description"
}

Delete a Work Orders

This endpoint deletes a specific Work Order.

HTTP Request

DELETE https://{tenant-subdomain}.inc.construction/api/v2/work_orders/{id}

URL Parameters

curl 'https://{tenant-subdomain}.inc.construction/api/v2/work_orders/{id}' -X DELETE \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json'


Update a Work Orders

Endpoint: PUT /api/v2/work_orders/{id}

Description: This endpoint updates an existing Work Order details by ID.

CURL Request

curl 'https://{tenant-subdomain}.inc.construction/api/v2/work_orders/{id}' -X PUT \
-H 'Authorization: Token YourApiToken,user_email=YourEmail' \
-H 'Content-Type: application/json' \
--data-raw '{
"work_order": {
    "number": "WO-001",
    "description": "Updated description",
    "department_id": 1
  }
}'

Parties (contacts)

Get All Parties

curl "https://{tenant-subdomain}.inc.construction/api/v2/parties" \
  -H 'Authorization: Token YourApiToken,user_email=YourEmail'

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "name": "Example Company",
    "type": "company",
    "addresses": [
      {
        "street": "123 Main St",
        "city": "Example City",
        "state": "EX",
        "zip": "12345",
        "country": "USA"
      }
    ]
  }
]

This endpoint retrieves all Parties.

HTTP Request

GET https://{tenant-subdomain}.inc.construction/api/v2/parties

Query Parameters

Pagination

⚠️ Coming Soon

Parameter Default Description
type null Filter by party type (building, company, contact)
subtype null Filter by party subtype
role null Filter by party role
# Role-based filters:

/api/v2/parties?role=employee    # Gets employee contacts
/api/v2/parties?role=supplier    # Gets both supplier contacts and companies
/api/v2/parties?role=client      # Gets both client contacts and companies



# Type-based filters:

/api/v2/parties?type=building    # Gets all buildings
/api/v2/parties?type=company     # Gets all companies
/api/v2/parties?type=contact     # Gets all contacts



Subtype-based filters (using the SUBTYPES arrays from your models):

/api/v2/parties?subtype=supplier   # Gets entities with supplier subtype
/api/v2/parties?subtype=client     # Gets entities with client subtype
/api/v2/parties?subtype=contact    # Gets entities with contact subtype
/api/v2/parties?subtype=employee   # Gets entities with employee subtype




# Type and Subtype combinations:

/api/v2/parties?type=contact&subtype=supplier    # Gets only contact-type suppliers
/api/v2/parties?type=company&subtype=client      # Gets only company-type clients



# Multiple subtypes (using comma separation):

/api/v2/parties?subtype=supplier,client          # Gets entities that are both suppliers and clients
/api/v2/parties?type=contact&subtype=employee,supplier  # Gets contacts that are both employees and suppliers

Create Party

curl -X POST "https://{tenant-subdomain}.inc.construction/api/v2/parties" \
  -H 'Authorization: Token YourToken,user_email=YourEmail' \
  -H "Content-Type: application/json" \
  -d '{
  "party": {
    "name": "Company Name",        // Required: Party name
    "type": "company",            // Required: company/contact/building
    "first_name": "John",         // Required for contacts
    "last_name": "Doe",           // Required for contacts
    "addresses_attributes": [{     // Optional: Address details
      "street": "123 Main St",
      "city": "Example City",
      "state": "EX",
      "zip": "12345"
    }],
    "phones_attributes": [{       // Optional: Phone numbers
      "value": "+1234567890",
      "type": "office"
    }],
    "emails_attributes": [{       // Optional: Email addresses
      "value": "contact@example.com"
    }]
  }
}'

The above command returns JSON structured like this:

{
  "id": 1,
  "name": "Example Company",
  "type": "company"
}

Update Party

curl -X PUT "https://{tenant-subdomain}.inc.construction/api/v2/parties/1" \
  -H 'Authorization: Token YourToken,user_email=YourEmail' \
  -H "Content-Type: application/json" \
  -d '{
    "party": {
      "name": "Updated Company Name"
    }
  }'

Delete Party

curl "https://{tenant-subdomain}.inc.construction/api/v2/parties/1" -X DELETE \
  -H 'Authorization: Token YourApiToken,user_email=YourEmail'

Contact Information

Create Phone

curl -X POST "https://{tenant-subdomain}.inc.construction/api/v2/phones" \
  -H 'Authorization: Token YourToken,user_email=YourEmail' \
  -H "Content-Type: application/json" \
  -d '{
    "phone": {
      "value": "+1234567890",
      "type": "office"
    }
  }'

Create Email

curl -X POST "https://{tenant-subdomain}.inc.construction/api/v2/emails" \
  -H 'Authorization: Token YourToken,user_email=YourEmail' \
  -H "Content-Type: application/json" \
  -d '{
    "email": {
      "value": "contact@example.com"
    }
  }'

Create Address

curl -X POST "https://{tenant-subdomain}.inc.construction/api/v2/addresses" \
  -H 'Authorization: Token YourToken,user_email=YourEmail' \
  -H "Content-Type: application/json" \
  -d '{
    "address": {
      "street": "123 Main St",
      "city": "Example City",
      "state": "EX",
      "zip": "12345",
      "country": "USA"
    }
  }'

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The kitten requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.