Invoice Contacts

This endpoint allows you to create, update and delete contacts that belong to customer invoices and to list contacts that belong to reversal invoices.

Contacts only exist in the context of a specific invoice. So whenever you want to list or interact with the contact for an invoice, you have to keep the type of invoice in mind and construct the endpoint's path from there. When referring to an endpoint's path below, whenever there's a {invoice_path}/contact, you have to adapt the path to the type of invoice you're dealing with. For example the path to listing the contact for a customer invoice is /api/v1/customer_invoices/{customer_invoice_id}/contact while the respective path for a reversal invoice is /api/v1/reversal_invoices/{reversal_invoice_id}/contact.

Attributes of an Contact

title string The salutation of the contact
first_name string The first name of the invoice's contact
name string The name of the invoice's contact
email string The contact's email address
phone string The contact's phone number in international format, such as +4912345123
fax string The contact's fax number in international format, such as +4912345123
mobile string The contact's fax number in international format, such as +4912345123
debitor identifier string

Attributes you send to Keyline to Create or Update a Contact

title string The salutation of the contact
first_name string The first name of the invoice's contact
name string The name of the invoice's contact
email string The contact's email address
phone string The contact's phone number in international format, such as +4912345123
fax string The contact's fax number in international format, such as +4912345123
mobile string The contact's fax number in international format, such as +4912345123
debitor identifier string

Actions

Creating an Invoice's Contact

A contact can be created for invoices as long as the customer invoice is not billed yet.

POST
{invoice_path}/contact

Example request

$ curl -i -H "Authorization: Bearer 4b00c2cbffba2d16d24dd8adf0e843e6b143b54dbf800ce7ef12d431927ef63f"\
  -H "Content-Type: application/json"\
  -X POST \
  -d '{"contact": {
        "title": "Herr",
        "first_name": "Max",
        "name": "Mustermann",
        "email": "email@example.com",
        "phone": "+49123124"
      } }'
  https://api.keyline-mis.com/api/v1/customer_invoices/3609/contact

Updating an Invoice's Contact

A contact can be updated for invoices as long as the customer invoice is not billed yet.

PATCH
{invoice_path}/contact

Example request

$ curl -X PATCH -H "Authorization: Bearer 4b00c2cbffba2d16d24dd8adf0e843e6b143b54dbf800ce7ef12d431927ef63f"\
  -H "Content-Type: application/json"\
  -d '{"contact": { "title": "Frau", "first_name": "Maxine" } }'
  https://api.keyline-mis.com/api/v1/customer_invoices/3609/contact

Deleting an Invoice's Contact

A contact can be delted for invoices as long as the customer invoice is not billed yet.

DELETE
{invoice_path}/contact

Example request

$ curl -X DELETE -H "Authorization: Bearer 4b00c2cbffba2d16d24dd8adf0e843e6b143b54dbf800ce7ef12d431927ef63f"\
  -H "Content-Type: application/json"\
  https://api.keyline-mis.com/api/v1/customer_invoices/3609/contact