API Documentation

API Endpoint

Contact Entries

Contact Entries

Supported filter params

  • person_id (array)

  • company_id (array)

  • invoice_id (array)

  • subsidiary_id (array)

  • contactable_id (array)

  • contactable_type (array)

Contactable types

The contactable_type attribute can have one of the following string values:

  • Person (used for contacts or users)

  • Client (used for companies)

  • Invoice (used for bill_from/bill_to on invoices)

  • Subsidiary

  • Purchase order

Contact entry types

The type attribute can have one of the following string values:

  • Address

  • BillFrom

  • BillTo

  • Email

  • Phone

  • Website

GET /api/v2/contact_entries
Requestsreturns contact entries

GET  /api/v2/contact_entries

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "41",
      "type": "contact_entries",
      "attributes": {
        "contactable_type": "company",
        "type": "email",
        "name": "Personal",
        "email": "contact1@email.com",
        "phone": null,
        "website": null,
        "address": null,
        "city": null,
        "state": null,
        "zipcode": null,
        "country": null,
        "vat": null,
        "billing_address": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "225"
          }
        },
        "company": {
          "meta": {
            "included": false
          }
        },
        "person": {
          "meta": {
            "included": false
          }
        },
        "invoice": {
          "meta": {
            "included": false
          }
        },
        "subsidiary": {
          "meta": {
            "included": false
          }
        },
        "purchase_order": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "42",
      "type": "contact_entries",
      "attributes": {
        "contactable_type": "company",
        "type": "email",
        "name": "Personal",
        "email": "contact2@email.com",
        "phone": null,
        "website": null,
        "address": null,
        "city": null,
        "state": null,
        "zipcode": null,
        "country": null,
        "vat": null,
        "billing_address": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "225"
          }
        },
        "company": {
          "meta": {
            "included": false
          }
        },
        "person": {
          "meta": {
            "included": false
          }
        },
        "invoice": {
          "meta": {
            "included": false
          }
        },
        "subsidiary": {
          "meta": {
            "included": false
          }
        },
        "purchase_order": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "43",
      "type": "contact_entries",
      "attributes": {
        "contactable_type": "company",
        "type": "email",
        "name": "Personal",
        "email": "contact3@email.com",
        "phone": null,
        "website": null,
        "address": null,
        "city": null,
        "state": null,
        "zipcode": null,
        "country": null,
        "vat": null,
        "billing_address": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "225"
          }
        },
        "company": {
          "meta": {
            "included": false
          }
        },
        "person": {
          "meta": {
            "included": false
          }
        },
        "invoice": {
          "meta": {
            "included": false
          }
        },
        "subsidiary": {
          "meta": {
            "included": false
          }
        },
        "purchase_order": {
          "meta": {
            "included": false
          }
        }
      }
    }
  ],
  "links": {
    "first": "http://api-test.productive.io/api/v2/contact_entries?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://api-test.productive.io/api/v2/contact_entries?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 3,
    "page_size": 30,
    "max_page_size": 200
  }
}

Get contact entries
GET/api/v2/contact_entries


GET /api/v2/contact_entries/1
Requestsreturns contact_entry

GET  /api/v2/contact_entries/44

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "44",
    "type": "contact_entries",
    "attributes": {
      "contactable_type": "company",
      "type": "email",
      "name": "Personal",
      "email": "contact4@email.com",
      "phone": null,
      "website": null,
      "address": null,
      "city": null,
      "state": null,
      "zipcode": null,
      "country": null,
      "vat": null,
      "billing_address": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "226"
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      },
      "invoice": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "purchase_order": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Gets a contact entry
GET/api/v2/contact_entries/{id}

URI Parameters
HideShow
id
number (required) Example: 1

contact entry id


POST /api/v2/contact_entries
Requestscreates contact_entryreturns error

POST  /api/v2/contact_entries

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "contact_entries",
    "attributes": {
      "contactable_type": "company",
      "type": "email",
      "name": "Work",
      "email": "contact@email.com"
    },
    "relationships": {
      "company": {
        "data": {
          "type": "companies",
          "id": "580"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "46",
    "type": "contact_entries",
    "attributes": {
      "contactable_type": "company",
      "type": "email",
      "name": "Work",
      "email": "contact@email.com",
      "phone": null,
      "website": null,
      "address": null,
      "city": null,
      "state": null,
      "zipcode": null,
      "country": null,
      "vat": null,
      "billing_address": false
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "227"
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      },
      "invoice": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "purchase_order": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Create a contact entry
POST/api/v2/contact_entries

URI Parameters
HideShow
name
string (required) Example: Name

name

type
string (required) Example: Address

type

contactable_type
string (required) Example: Client

contactable type


PATCH /api/v2/contact_entries/1
Requestsupdates contact_entryreturns errorupdates contact_entryupdates contact_entry

PATCH  /api/v2/contact_entries/56

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "contact_entries",
    "attributes": {
      "name": "new name"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "56",
    "type": "contact_entries",
    "attributes": {
      "contactable_type": "company",
      "type": "email",
      "name": "new name",
      "email": "contact12@email.com",
      "phone": null,
      "website": null,
      "address": null,
      "city": null,
      "state": null,
      "zipcode": null,
      "country": null,
      "vat": null,
      "billing_address": false
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": "234"
        }
      },
      "company": {
        "meta": {
          "included": false
        }
      },
      "person": {
        "meta": {
          "included": false
        }
      },
      "invoice": {
        "meta": {
          "included": false
        }
      },
      "subsidiary": {
        "meta": {
          "included": false
        }
      },
      "purchase_order": {
        "meta": {
          "included": false
        }
      }
    }
  },
  "meta": {}
}

Update a contact entry
PATCH/api/v2/contact_entries/{id}

URI Parameters
HideShow
id
number (required) Example: 1

contact entry id


DELETE /api/v2/contact_entries/1
Requestsdeletes contact_entry

DELETE  /api/v2/contact_entries/61

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a contact entry
DELETE/api/v2/contact_entries/{id}

URI Parameters
HideShow
id
number (required) Example: 1

contact entry id


Generated by aglio on 08 May 2025