Create contractor

Add a contractor to your iFirma list.

POST https://cotlet.dev/api/v1/ifirma/postals/{postal_code}/contractors

write

Creates a contractor record. Name, postal code and city are required. Nothing is sent to anyone, and the contractor can be edited or deleted in the app, so create_contractor runs without asking first.

Parameters

Parameters: create_contractor
NameTypeDescription
name string required string Contractor name, up to 150 characters.
postal_code string required string Postal code.
city string required string City.
street string string Street and number.
nip string string Tax number (NIP).
country_code string string Two-letter country code.
email string string Email address used for sending invoices and reminders.
private_person boolean boolean true for a private person. Default: false.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/ifirma/postals/postal%20code/contractors \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Jane Doe","city":"city"}'
Python
result = client.call("ifirma", "create_contractor", {"name":"Jane Doe","postal_code":"postal code","city":"city"})
Node.js
const result = await cotlet.call('ifirma', 'create_contractor', {"name":"Jane Doe","postal_code":"postal code","city":"city"});
CLI
cotlet call ifirma create_contractor --data '{"name":"Jane Doe","postal_code":"postal code","city":"city"}'

Example response

JSON

{
  "id": "c_4901",
  "name": "Lime Courier Sp. z o.o.",
  "nip": "9512345678",
  "email": "office@limecourier.example",
  "city": "Warsaw",
  "postal_code": "00-001",
  "country_code": "PL"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.