Skip to content
On this page
netzo/apis/holded

Holded

Holded is a business management software that helps you manage your business from sales and purchases to accounting and taxes.

  • labels: sales, accounting/finance
  • authentication: apiKey

Usage

ts
import { holded } from 'https://deno.land/x/netzo/apis/holded/mod.ts'

const { api } = holded({
  apiKey: Deno.env.get('HOLDED_API_KEY')
})
import { holded } from 'https://deno.land/x/netzo/apis/holded/mod.ts'

const { api } = holded({
  apiKey: Deno.env.get('HOLDED_API_KEY')
})

Configuration

The holded factory function expects an object with the following, and returns an object with an HTTP client api.

ParamTypeDefaultDescription
apiKeystringDeno.env.get('HOLDED_API_KEY')the api key to use for authentication

Refer to the API documentation to get the required information.

Examples

The following examples assume you have created an api client instance. Refer to the type definitions for all exported types to pass to the api client for typed responses.

Find contacts

Find all contacts that match the query.

ts
import type { Contact, QueryContacts } from 'netzo/apis/holded/types.ts'

const query: QueryContacts = {}
const resultData = await api.invoicing.v1.contacts.get<Contact[]>(query)
import type { Contact, QueryContacts } from 'netzo/apis/holded/types.ts'

const query: QueryContacts = {}
const resultData = await api.invoicing.v1.contacts.get<Contact[]>(query)

Get contact

Get a contact by id.

ts
import type { Contact } from 'netzo/apis/holded/types.ts'

const resultData = await api.invoicing.v1.contacts[CONTACT_ID].get<Contact>()
import type { Contact } from 'netzo/apis/holded/types.ts'

const resultData = await api.invoicing.v1.contacts[CONTACT_ID].get<Contact>()

Add contact

Add a new contact.

ts
import type { ContactResult, DataAddContact } from 'netzo/apis/holded/types.ts'

const data: DataAddContact = { name: 'New contact name' }
const resultData = await api.invoicing.v1.contacts.post<ContactResult>(data)
import type { ContactResult, DataAddContact } from 'netzo/apis/holded/types.ts'

const data: DataAddContact = { name: 'New contact name' }
const resultData = await api.invoicing.v1.contacts.post<ContactResult>(data)

Update contact

Update a contact by id.

ts
import type { ContactResult, DataUpdateContact } from 'netzo/apis/holded/types.ts'

const data: DataUpdateContact = { name: 'Updated contact name' }
const resultData = await api.invoicing.v1.contacts[CONTACT_ID].put<ContactResult>(data)
import type { ContactResult, DataUpdateContact } from 'netzo/apis/holded/types.ts'

const data: DataUpdateContact = { name: 'Updated contact name' }
const resultData = await api.invoicing.v1.contacts[CONTACT_ID].put<ContactResult>(data)

Delete contact

Delete a contact by id.

ts
import type { ContactResult } from 'netzo/apis/holded/types.ts'

const resultData = await api.invoicing.v1.contacts[CONTACT_ID].delete<ContactResult>()
import type { ContactResult } from 'netzo/apis/holded/types.ts'

const resultData = await api.invoicing.v1.contacts[CONTACT_ID].delete<ContactResult>()