Hook up your own application with The Machine's functionality.

project.edit

This method let you edit the project with the given id.

You call this method with the following URL:

Parameters

Parameters are the data you will pass with the call.

api_token

Your secret identifier. You find your API Token under Account Overview in the Account section.

Rules: Required

id

The ID of the project.

Rules: Required.

description (optional)

The description of the project.

Rules: None.

hours (optional)

The number of hours for the project.

Rules: Can only include numeric characters.

rate (optional)

The rate for the project.

Rules: Can only include numeric characters.

get (optional)

If this parameter is set the result sent back will be the edited project in XML data rather than the success message.

Rules: If parameter is used it must be set to "true". Otherwise it will be ignored.

Return Values

This is the result that will be passed back to you when you have sent a call.

Success

Success: Project edited.

The project was successfully edited.

If you have set the get parameter to "true" you will rather get the edited project in XML sent back to you. Like this:

<?xml version="1.0" encoding="utf-8"?>
    <method request="project.get">
        <project>
        <id>204618</id>
        <description>Web Design</description>
        <hours>10</hours>
        <rate>120.00</rate>
        <total>1200.00</total>
        <status>Draft</status>
    </project>
</method>
Error

Error: No data passed.

No data was passed to the method.

Error: API Token is invalid.

The API Token parameter is missing or is incorrectly entered.

Error: ID is invalid.

The ID parameter is missing or is incorrectly entered.

Error: Hours is invalid.

The Hours parameter is incorrectly entered.

Error: Rate is invalid.

The Rate parameter is incorrectly entered.

Example

The example below is strictly a demonstration of the method and it's parameters. Methods should never be posted from a HTML form. They should be posted directly from your server script.

<form action="http://machine_id.invoicemachine.com/api/project.edit" method="post">
    <input type="hidden" name="api_token" value="c86cea54c71sbb05a5f8297bed641944">
    <input type="hidden" name="id" value="204618">
    <input type="hidden" name="rate" value="120">
</form>