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
| Name | Type | Description |
|---|---|---|
| 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 -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"}' result = client.call("ifirma", "create_contractor", {"name":"Jane Doe","postal_code":"postal code","city":"city"}) const result = await cotlet.call('ifirma', 'create_contractor', {"name":"Jane Doe","postal_code":"postal code","city":"city"}); cotlet call ifirma create_contractor --data '{"name":"Jane Doe","postal_code":"postal code","city":"city"}' Example response
{
"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"
}