Skip to content

WorkETC API Hints Unofficial Docs

zmpeg edited this page May 1, 2012 · 5 revisions

Creating Objects

Creating objects in WorkETC from PHP is a pain. Here are some hints to help.

Getting Started

Make sure you whitelist the IP of the server you are using in the WorkETC Security Settings. WorkETC will allow you to log in, but then block requests with VeetroException: Employee Authentication Required

Session

Make sure your server has session support, and make sure you include the library before any output. If you don't call session_start(), then PHP-WorkETC will.

Use an object to create an object

We have found that life is easier if you first get a object from worketc, reset all the fields to what you need, then pass it back. Often, the provided docs are outdated, and this is a better way to find out what objects need to be passed in to create.

Creating date fields.

All date fields can be left as: 0001-01-01T00:00:00. As far as we can tell, that will auto populate the current date and leave all previous dates intact.

Abitrary Rules

  • Only strings can be NULL, unless mandatory.
  • If it is bool or int it must be zero.
  • Dates must be filled out as described above under CREATING DATE FIELDS.