Connec API V2

This documentation presents all the entities available on Connec!™, provided by Maestrano.

API Host

Connec!™ API production host is: https://api-connec.maestrano.com

Path prefixing

All API path must be prefixed by the API version (v2) and customer group_id: /api/<version>/<group_id>

E.g: Assuming that my customer group_id is cld-sdf5751, the full path to /organizations will be:

/api/v2/cld-sdf5751/organizations

If you are using one of the Maestrano SDKs, this will automatically be handled for you.

Authentication

The Connec!™ V2 APIs use HTTP basic authentication:
username: <your API key>
password: <your API token>

If you are using one of the Maestrano SDKs, this will automatically be handled for you.

Authentication levels

The API proposes 3 levels of authentication:

Application credentials

When an application is registered on the Developer Platform, a set of API keys is automatically configured for this application. Access to user data is granted once this application has been added to a customer dashboard of applications. Using the Maestrano SDKs will handle the dynamic listing of your application on the various marketplaces available.

Developer credentials

After registering on the developer platform, you can access the Sandbox front-end to test your integration. Under your My Account settings, section Developer, you can enable your user credentials and access the Connec!™ API. This set of credentials has access to all the organizations created with your user.

With this set of credentials you can use your org-uid to query Connec!™

/api/v2/org-sdf5751/organizations
Tenant credentials

This set of credentials is only available to enterprise customers and has access to all your customers data.

Documentation

  • : Uniq attribute

  • : Read only attribute

  • : Mandatory attribute



API | JSON Schemas

JSON Schema for a collection

GET https://api-connec.maestrano.com/api/v2/json_schema/:collection_name
Responses200
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "organizations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Organization UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (cld-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (org-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
            "type": "string",
            "format": "enum"
          },
          "name": {
            "description": "Organization name",
            "type": "string"
          },
          "reference": {
            "description": "Organization reference",
            "type": "string"
          },
          "industry": {
            "description": "Industry sector (banking, communication, construction, engineering, finance...)",
            "type": "string"
          },
          "annual_revenue": {
            "description": "Organization annual revenue",
            "type": "number"
          },
          "capital": {
            "description": "Organization capital",
            "type": "number"
          },
          "number_of_employees": {
            "description": "Organization number of employees",
            "type": "integer"
          },
          "is_customer": {
            "description": "Organization is classified as a Customer",
            "type": "boolean"
          },
          "is_supplier": {
            "description": "Organization is classified as a Supplier",
            "type": "boolean"
          },
          "is_lead": {
            "description": "Organization is classified as a Lead",
            "type": "boolean"
          },
          "contact_channel": {
            "description": "Channels to join the organization",
            "$ref": "#/definitions/contact_channel"
          },
          "email": {
            "description": "Organization email addresses",
            "$ref": "#/definitions/email"
          },
          "address": {
            "description": "Organization addresses",
            "$ref": "#/definitions/address"
          },
          "website": {
            "description": "Organization websites",
            "$ref": "#/definitions/website"
          },
          "phone": {
            "description": "Organization phone and fax numbers",
            "$ref": "#/definitions/phone"
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

JSON Schema for a collection
GET/api/v2/json_schema/:collection_name

JSON schemas are exposed for each collection

GET /api/v2/json_schema/organizations

API | Querying

List of resources

GET https://api-connec.maestrano.com/api/v2/:group_id/(root path)
Responses200
Body
{
  "_links": [
    {
      "company": {
        "href": "/api/v2/cld-945d2/company"
      }
    },
    {
      "accounts": {
        "href": "/api/v2/cld-945d2/accounts"
      }
    },
    {
      "invoices": {
        "href": "/api/v2/cld-945d2/invoices"
      }
    },
    {
      "credit_notes": {
        "href": "/api/v2/cld-945d2/credit_notes"
      }
    },
    {
      "credit_payments": {
        "href": "/api/v2/cld-945d2/credit_payments"
      }
    },
    {
      "sales_orders": {
        "href": "/api/v2/cld-945d2/sales_orders"
      }
    },
    {
      "...": "..."
    }
  ]
}

List of resources
GET/api/v2/:group_id/(root path)

The complete list of available resources can be retrieved from the API root endpoint (with group_id specified or not):

GET https://api-connec.maestrano.com/api/v2(/:group_id)

When a group_id is specified in the URL then all generated resource paths in the response will be scoped to that group_id. If not group_id is specified in the URL then all paths in the response will contain a generic :group_id resource parameter.

This resource listing can help you find your way when navigating through the API by returning the path of all available resources.


Resources collection

GET https://api-connec.maestrano.com/api/v2/:group_id/:collection_name
Responses200
Body
{
  "organizations": [
    {
      "id": "e32303c1-5102-0132-661e-600308937d74",
      "group_id": "cld-4d7f86",
      "created_at": "2014-11-18T03:42:45Z",
      "updated_at": "2014-11-18T03:42:45Z",
      "name": "DoeCorp Inc."
    },
    {
      "id": "e12303c1-7102-0032-661e-100304937d74",
      "group_id": "cld-4d7f86",
      "created_at": "2014-11-11T03:12:45Z",
      "updated_at": "2014-11-12T03:32:45Z",
      "name": "Jack Corp Inc."
    },
    {
      "...": "..."
    }
  ]
}

Resources collection
GET/api/v2/:group_id/:collection_name

To retrieve a collection of resources, an HTTP GET request is issued agains the resources endpoint. By default, only the first 100 elements of the collection ordered by creation date are returned. Refer to the filter and pagination section below for more details.

Assuming your application group_id is cld-dkg601, to retrieve the list of organizations the following request is sent

GET /api/v2/cld-dkg601/organizations

Single Resource

GET https://api-connec.maestrano.com/api/v2/:group_id/:collection_name/:id
Responses200
Body
{
  "organizations": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-11-18T03:42:45Z",
    "updated_at": "2014-11-18T03:42:45Z",
    "name": "DoeCorp Inc."
  }
}

Single Resource
GET/api/v2/:group_id/:collection_name/:id

To fetch a single resource by its unique identifier, a GET request against the resource URL can be sent.

GET /api/v2/cld-dkg601/organizations/e32303c1-5102-0132-661e-600308937d74

Pagination

GET https://api-connec.maestrano.com/api/v2/:group_id/:collection_name?$top=100&$skip=10
Responses200
Body
{
  "events": [
    {
      "id": "aace0181-a55a-0132-47cc-22000aac819e",
      "code": "EV87"
    },
    {
      "...": "..."
    }
  ],
  "pagination": {
    "skip": 0,
    "top": 10,
    "total": 37,
    "next": "https://api-connec.maestrano.com/api/v2/cld-dkg601/events?%24skip=10&%24top=10"
  }
}

Pagination
GET/api/v2/:group_id/:collection_name?$top=100&$skip=10

When retrieving a collection of resources, only the first 100 elements are returned by default. To fetch the entire collection, the pagination mechanism must be used. The following parameters can be specified in the URL:

$top the number of elements to return

$skip the index of the first element

$orderby the field(s) to order resources on

The pagination details are returned when fetching a collection, including the next and previous URL for convenience.

Examples:

Request to fetch the first 10 Events (response provided)

GET /api/v2/cld-dkg601/events?$top=10

Request to retrieve the last created Organization

GET /api/v2/cld-dkg601/organizations?$top=1&$orderby=created_at desc

Request to retrieve the Organizations from index 10 to 19 ordered by name

GET /api/v2/cld-dkg601/organizations?$top=10&$skip=10&$orderby=name asc

Filtering

GET https://api-connec.maestrano.com/api/v2/:group_id/:collection_name?$filter=:filter_query
Responses200
Body
{
  "organizations": [
    {
      "id": "e32303c1-5102-0132-661e-600308937d74",
      "group_id": "cld-4d7f86",
      "created_at": "2015-04-18T03:42:45Z",
      "updated_at": "2016-01-18T03:42:45Z",
      "name": "DoeCorp Inc."
    },
    {
      "id": "e12303c1-7102-0032-661e-100304937d74",
      "group_id": "cld-4d7f86",
      "created_at": "2015-05-11T03:12:45Z",
      "updated_at": "2015-06-12T03:32:45Z",
      "name": "Jack Corp Inc."
    }
  ]
}

Filtering
GET/api/v2/:group_id/:collection_name?$filter=:filter_query

To filter a request on the collection of resources, the $filter URL parameter can be specified. The following criteria are currently supported:

eq attribute must be equal to value

gt attribute must be greater than value

gte attribute must be greater or equal to value

lt attribute must be lower than value

lte attribute must be lower or equal to value

ne attribute must not be equal to value

nin attribute must not be included in the array

in attribute must be included in the array

Examples:

Retrieve the Organizations having 5 employees and created after 31/03/2015 (response provided)

GET /api/v2/cld-dkg601/organizations?$filter=number_of_employees eq 5 and created_at gt '2015-03-31'

Retrieve the Invoices that are neither at status “DRAFT” nor “VOIDED”

GET /api/v2/cld-dkg601/invoices?$filter=status nin ['DRAFT','VOIDED']

Retrieve Invoices providing a list of ids (the id field must be passed as _id):

GET /api/v2/cld-dkg601/invoices?$filter=_id in ['e32303c1-5102-0132-661e-600308937d74','e12303c1-7102-0032-661e-100304937d74']

Filters can be combined with Pagination parameters

api/v2/org-fnfv/organizations?$filter=name ne 'DOE Inc'&$orderby=updated_at desc

In order to filter using a nested field, use dotted notation

api/v2/org-fnfv/organizations?$filter=email.address ne 'johnsmith@test.com'&$orderby=created_at desc

Filtering can be used to return the total number of entries of a collection subset

api/v2/group_id/journals?$top=0&$filter=journal_lines.account_id eq 'c6c27b81-1577-0134-99b8-31e5d21a2769'

Custom headers

GET https://api-connec.maestrano.com/api/v2/:group_id/:collection_name

Custom headers
GET/api/v2/:group_id/:collection_name

Several custom headers are available to refine the data that you query:

CONNEC-COUNTRY-FORMAT=alpha2

The API returns by default the full name of countries, like Australia. With this header, it will returns a two letters code as definied by the ISO 3166, like AU.


API | Save Data

Resource creation

POST https://api-connec.maestrano.com/api/v2/:group_id/:collection_name
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "organizations": {
    "name": "Doe Corp Inc.",
    "is_customer": true
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "organizations": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "name": "Doe Corp Inc.",
    "is_customer": true
  }
}

Resource creation
POST/api/v2/:group_id/:collection_name

To create a new resource, an HTTP POST request is issued against the resource collection endpoint. The payload of the request must contain the resource attributes as described in the resources schemas in the sections below.

Assuming your application group_id is cld-dkg601, to create a resource of type organizations the following request can be sent:

POST /api/v2/cld-dkg601/organizations

with the following payload:

{
  "organizations": {
    "name": "Doe Corp Inc.",
    "is_customer": true
  }
}

Smart merging

When creating an entity, you can specify which attributes you want to use to merge with an existing record. If a record is matched, it will behave like an update request and return the existing entity with a 200 status code. This can be specified with the option matching_fields

Match on a single field

POST /api/v2/cld-dkg601/organizations
{
  "organizations": {
    "opts": {"matching_fields": ["name"]},
    "name": "Doe Corp Inc.",
    "is_customer": true
  }
}

Match on multiple fields (matches name and reference)

POST /api/v2/cld-dkg601/organizations
{
  "organizations": {
    "opts": {"matching_fields": ["name", "reference"]},
    "name": "Doe Corp Inc.",
    "reference": "015401",
    "is_customer": true
  }
}

Match on multiple sets of fields (matches either name or reference)

POST /api/v2/cld-dkg601/organizations
{
  "organizations": {
    "opts": {"matching_fields": [["name"], ["reference"]]},
    "name": "Doe Corp Inc.",
    "reference": "015401",
    "is_customer": true
  }
}

Resource update

PUT https://api-connec.maestrano.com/:collection_name/:id
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "organizations": {
    "name": "DoeCorp Inc.",
    "is_supplier": true
  }
}
Responses200404
Body
{
  "organizations": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "name": "Doe Corp Inc.",
    "is_customer": true
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Resource update
PUT/:collection_name/:id

To update a resource, an HTTP PUT request is issued against the single resource endpoint. The payload of the request must contain the resource attributes as described in the resources schemas in the sections below.

Assuming your application group_id is cld-dkg601, to update a resource of type organizations with the id e32303c1-5102-0132-661e-600308937d74 the following request can be sent:

PUT /api/v2/cld-dkg601/organizations/e32303c1-5102-0132-661e-600308937d74

with the following payload:

{
  "organizations": {
    "name": "Doe Corp Inc.",
    "is_customer": true
  }
}

Integration considerations

As new objects are created in Connec!™, it is required that you maintain a mapping between your application entities and the Connec!™ resources to perform updates against the resources. More information can be found on the Maestrano developer documentation: Multi-tenant > ID mapping

Nested collections operations

When updating an entity with nested fields (such as ‘lines’), you can specify the behaviour desired. This can be specified with the option sparse

“sparse”: true => collection elements not specified in the update requests are not modified

“sparse”: false => collection elements not specified in the update requests are deleted

Given the following record exists

{
  "employees": {
    "id": "4fc4d621-8037-0133-3e14-025dd6a1bb31",
    "first_name": "John",
    "last_name": "Doe",
    "birth_date": "1976-03-17",
    "work_locations": [
      {
        "id": "568f021e9537296f45004856",
        "role": "developer",
        "work_location_id": "c48ca3b1-97cb-0133-6118-060bcee6eb9d"
      },
      {
        "id": "568f021e9537296f45004858",
        "role": "developer",
        "work_location_id": "e9c39df1-97cb-0133-611c-060bcee6eb9d"
      }
    ],
    "channel_id": "org-abcd",
    "resource_type": "employees"
  }
}

Sending a sparse PUT request as follows:

{
  "employees": {
    "opts": {
      "sparse": true
    },
    "work_locations": [
      {
        "role": "software developer",
        "work_location_id": "c48ca3b1-97cb-0133-6118-060bcee6eb9d"
      }
    ]
  }
}

Will receive this response:

{
  "employees": {
    "id": "4fc4d621-8037-0133-3e14-025dd6a1bb31",
    "first_name": "John",
    "last_name": "Doe",
    "birth_date": "1976-03-17",
    "work_locations": [
      {
        "id": "568f021e9537296f45004856",
        "role": "software developer",
        "work_location_id": "c48ca3b1-97cb-0133-6118-060bcee6eb9d"
      },
      {
        "id": "568f021e9537296f45004858",
        "role": "developer",
        "work_location_id": "e9c39df1-97cb-0133-611c-060bcee6eb9d"
      }
    ],
    "channel_id": "org-abcd",
    "resource_type": "employees"
  }
}

Sending a non sparse PUT request:

{
  "employees": {
    "opts": {
      "sparse": false
    },
    "work_locations": [
      {
        "role": "software developer",
        "work_location_id": "c48ca3b1-97cb-0133-6118-060bcee6eb9d"
      }
    ]
  }
}

Response:

{
  "employees": {
    "id": "4fc4d621-8037-0133-3e14-025dd6a1bb31",
    "first_name": "John",
    "last_name": "Doe",
    "birth_date": "1976-03-17",
    "work_locations": [
      {
        "id": "568f021e9537296f45004856",
        "role": "software developer",
        "work_location_id": "c48ca3b1-97cb-0133-6118-060bcee6eb9d"
      }
    ],
    "channel_id": "org-abcd",
    "resource_type": "employees"
  }
}

API | Batch Calls

Batch Calls

POST https://api-connec.maestrano.com/batch
Requestsexample 1
Headers
Content-Type: application/json
Body
{
  "ops": [
    {
      "method": "get",
      "url": "/api/v2/cld-sdf5751/organizations",
      "params": {
        "sso_session": "572d934f3dd74e3749e451e5ccd55b840071f5c9",
        "$top": 1
      }
    },
    {
      "method": "post",
      "url": "/api/v2/cld-sdf5751/organization",
      "params": {
        "organizations": {
          "name": "Doe Corp Inc.",
          "is_customer": true
        }
      },
      "headers": {
        "Authorization": "Basic bWFlc3RyYW5vOmlzQXdlc29tZQ=="
      }
    },
    {
      "method": "delete",
      "url": "/oh/no/error",
      "headers": {
        "break": "fast"
      }
    }
  ],
  "sequential": true
}
Responses201
Headers
Content-Type: application/json
Body
{
  results: [
    {status: 200, body: {organizations:[{id: ...], headers: {"X-Frame-Options": "SAMEORIGIN" ...,},
    {status: 200, body: {organizations: {id: ...}, headers: {"X-Frame-Options": "SAMEORIGIN" ...,}},
    {status: 404, body: "Not Found", headers: {"X-Cascade": "pass"}}
  ]
}

Batch Calls
POST/batch

General Concepts

It is possible batch API queries/updates mixing multiple entities in one API call.

The example shows that each request in the batch - or “operation” in batch parlance - is equivalent to a regular API call as described for each API resource in this documentation.

Each operation contains the following attributes:

  • url: the API endpoint to hit, formatted exactly as you would for a regular REST API request, leading / and all. (required)

  • method: what type of request to make – GET, POST, PUT, etc. If no method is supplied, GET is assumed. (optional)

  • params: a hash of arguments to the API. This can be used for both GET and PUT/POST/PATCH requests. (optional)

  • headers: a hash of request-specific headers. The headers sent in the request will be included as well, with operation-specific headers taking precendence. (optional)

These individual operations are supplied as the “ops” parameter in the overall request. Other options include:

  • sequential: execute all operations sequentially, rather than in parallel. This parameter is currently REQUIRED and must be set to true. (In the future the Batch API will offer parallel processing for thread-safe apps, and hence this parameter must be supplied in order to explicitly preserve expected behavior.)

Authentication

Each operation call needs to be authenticated. Either with:

Responses

The Batch API will always return a 200, with a JSON body containing the individual responses under the “results” key. Those responses, in turn, contain the same main components of any HTTP response:

  • status: the HTTP status (200, 201, 400, etc.)

  • body: the rendered body

  • headers: any response headers

Errors

Errors in individual Batch API requests will be returned inline, with the same status code and body they would return as individual requests.

If the Batch API itself returns a non-200 status code, that indicates a global problem.


API Admin | Webhooks

To support third-party information systems integrations, Connec!™ can be configured to send notifications to webhooks. These webhooks must be configured using admin credentials and will be triggered for all the customers. Configuring a Webhook will POST the content of created/updated entities subscribed to the endpoint.

Note:

  • api_key, api_secret, endpoint, and name are all required fields, the others are optional

  • subscribed_entities must be in an array

  • detailed_notifications must be a boolean value

    • false: only the entity type and id are sent
    • true: the complete object content is sent
  • period (seconds - default: 60) must be an integer value. The updated entities will be batched together into notifications sent periodically. When period is set at 0, the notifications are sent in real time (one notification sent per entity updated)

  • max_size must be an integer value (default: 30)

  • timeout (seconds - default: 5) corresponds to the maximum timeout after which the webhook notification will fail and restart later

To delete an existing webhook make a DELETE request to ‘api/v2/admin/webhooks/:id’.

Webhooks List

GET https://api-connec.maestrano.com/api/v2/admin/webhooks
Responses200
Headers
Content-Type: application/vnd.api+json
Body
[
  {
    "_id": {
      "$oid": "57c63bca42a4fbbd4666f8f5"
    },
    "api_key": "username",
    "api_secret": "password",
    "detailed_notifications": true,
    "endpoint": "https://myapplication.com/api/notifications",
    "name": "my-application",
    "period": 60,
    "max_size": 30,
    "timeout": 5,
    "subscribed_entities": [
      "Journals",
      "Accounts",
      "People",
      "Organizations",
      "Invoices",
      "CreditNotes",
      "Employees",
      "PayRuns",
      "PayStubs",
      "Items",
      "Opportunities",
      "AppUsers",
      "PaySchedules",
      "PayItems"
    ]
  }
]

Get Webhooks
GET/api/v2/admin/webhooks

Get the list of webhooks.


POST https://api-connec.maestrano.com/api/v2/admin/webhooks
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "api_key": "username",
  "api_secret": "password",
  "detailed_notifications": true,
  "endpoint": "https://myapplication.com/api/notifications",
  "name": "my-application",
  "subscribed_entities": [
    "Journals"
  ],
  "period": 60,
  "max_size": 30,
  "timeout": 5
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "_id": {
    "$oid": "57c63bca42a4fbbd4666f8f5"
  },
  "api_key": "username",
  "api_secret": "password",
  "detailed_notifications": true,
  "endpoint": "https://myapplication.com/api/notifications",
  "name": "my-application",
  "subscribed_entities": [
    "Journals"
  ],
  "period": 60,
  "max_size": 30,
  "timeout": 5
}

Create New Webhook
POST/api/v2/admin/webhooks

Create a new Webhook.


Webhook

GET https://api-connec.maestrano.com/api/v2/admin/webhooks/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "_id": {
    "$oid": "57c63bca42a4fbbd4666f8f5"
  },
  "api_key": "username",
  "api_secret": "password",
  "detailed_notifications": true,
  "endpoint": "https://myapplication.com/api/notifications",
  "name": "my-application",
  "subscribed_entities": [
    "Journals"
  ],
  "period": 60,
  "max_size": 30,
  "timeout": 5
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Webhook
GET/api/v2/admin/webhooks/{id}

Get a single webhook.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The webhook ID


PUT https://api-connec.maestrano.com/api/v2/admin/webhooks/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "api_key": "username",
  "api_secret": "password",
  "detailed_notifications": true,
  "endpoint": "https://myapplication.com/api/notifications",
  "name": "my-application",
  "subscribed_entities": [
    "Journals"
  ],
  "period": 60,
  "max_size": 30,
  "timeout": 5
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "_id": {
    "$oid": "57c63bca42a4fbbd4666f8f5"
  },
  "api_key": "username",
  "api_secret": "password",
  "detailed_notifications": true,
  "endpoint": "https://myapplication.com/api/notifications",
  "name": "my-application",
  "subscribed_entities": [
    "Journals"
  ],
  "period": 60,
  "max_size": 30,
  "timeout": 5
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a Webhook
PUT/api/v2/admin/webhooks/{id}

Update a single Webhook

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The webhook ID


DELETE https://api-connec.maestrano.com/api/v2/admin/webhooks/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "_id": {
    "$oid": "57c63bca42a4fbbd4666f8f5"
  },
  "api_key": "username",
  "api_secret": "password",
  "detailed_notifications": true,
  "endpoint": "https://myapplication.com/api/notifications",
  "name": "my-application",
  "subscribed_entities": [
    "Journals"
  ],
  "period": 60,
  "max_size": 30,
  "timeout": 5
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Delete a Webhook
DELETE/api/v2/admin/webhooks/{id}

Delete a Webhook

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The webhook ID


API | Tracking Tags

All objects in Connec! can be attributed one or several Tracking Tag. A tracking tag is a simple structure that can be set on any entity or sub entity in Connec! and can be used to further classify entities.

A tag has the following structure, with a name indicating the tag category and a value indicating tag value:

"tags": [
  {
    "id": "58ca223abd44784f884f382f",
    "name": "Region",
    "value": "South"
  }
]

List of tags per resources

GET https://api-connec.maestrano.com/api/v2/:group_id/:collection_name/:id
Responses200
Body
{
  "journals": {
    "id": "43372dd0-ec38-0134-4938-0021cc6899a1",
    "status": "ACTIVE",
    ... ,
    "journal_lines": [
      {
        "id": "58ca2416bd44784f884f5495",
        "status": "ACTIVE",
        "posting_type": "DEBIT",
        "account_id": "74032b40-ec36-0134-3ddf-0021cc6899a1",
        ...,
        "tags": [
          {
            "id": "58ca223abd44784f884f382f",
            "tag_reference_value_id": "59641c9bbd447854b5ad751e"
          }
        ]
      },
      {
        ...
      }
    ],
    "created_at": "2017-03-16T05:35:19Z",
    "updated_at": "2017-03-16T05:35:19Z",
    "group_id": "org-fbbj",
    "channel_id": "org-fbbj",
    "resource_type": "journals"
  }
}

List of tags per resources
GET/api/v2/:group_id/:collection_name/:id

Tags attached to any entity will show in the response

For example, assuming you wan’t to retrieve a specific journal for the organization org-fbbj:

GET https://api-connec.maestrano.com/api/v2/org-fbbj/43372dd0-ec38-0134-4938-0021cc6899a1

The example shows a tag at the journal_line level


Assign a tag to an entity

PUT https://api-connec.maestrano.com/api/v2/:group_id/:collection_name/:id
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "invoices": {
    "id": "26058520-a443-0134-2a60-0021cc6899a1",
    "tags": [
      {
        "tag_reference_value_id": "59641c9bbd447854b5ad751e"
      }
    ]
  }
}
Responses200
Body
{
  "invoices": {
    "id": "26058520-a443-0134-2a60-0021cc6899a1",
    "code": "IN1",
    "...": "...",
    "tags": [
      {
        "id": "58d33160bd447835aaee6f62",
        "name": "Region",
        "value": "Test"
      }
    ]
  }
}

Assign a tag to an entity
PUT/api/v2/:group_id/:collection_name/:id

Post a tag on an entity to add it.

Assuming your application group_id is org-fbbj, and you want to add a tag to an invoice. tag_reference_value_id needs to refer to a valid Tag Reference Value Id

PUT https://api-connec.maestrano.com/api/v2/org-fbbj/26058520-a443-0134-2a60-0021cc6899a1

API | Attribute Types

Account Classifications

Accounts classification, type and subtype

Classification Type SubType
ASSET BANK CASHONHAND
CHECKING
MONEYMARKET
RENTSHELDINTRUST
SAVINGS
TRUSTACCOUNTS
OTHERCURRENTASSET EMPLOYEECASHADVANCES
ALLOWANCEFORBADDEBTS
DEVELOPMENTCOSTS
OTHERCURRENTASSETS
INVENTORY
LOANSTOOFFICERS
INVESTMENT_MORTGAGEREALESTATELOANS
INVESTMENT_OTHER
INVESTMENT_TAXEXEMPTSECURITIES
INVESTMENT_USGOVERNMENTOBLIGATIONS
LOANSTOOTHERS
LOANSTOSTOCKHOLDERS
PREPAIDEXPENSES
RETAINAGE
UNDEPOSITEDFUNDS
FIXEDASSET FURNITUREANDFIXTURES
ACCUMULATEDDEPLETION
ACCUMULATEDDEPRECIATION
DEPLETABLEASSETS
LAND
LEASEHOLDIMPROVEMENTS
OTHERFIXEDASSETS
ACCUMULATEDAMORTIZATION
BUILDINGS
INTANGIBLEASSETS
MACHINERYANDEQUIPMENT
VEHICLES
OTHERASSET LICENSES
LEASEBUYOUT
OTHERLONGTERMASSETS
SECURITYDEPOSITS
ACCUMULATEDAMORTIZATIONOFOTHERASSETS
GOODWILL
ORGANIZATIONALCOSTS
ACCOUNTSRECEIVABLE ACCOUNTSRECEIVABLE
EQUITY EQUITY OPENINGBALANCEEQUITY
PARTNERSEQUITY
RETAINEDEARNINGS
ACCUMULATEDADJUSTMENT
OWNERSEQUITY
PAIDINCAPITALORSURPLUS
PARTNERCONTRIBUTIONS
PARTNERDISTRIBUTIONS
PREFERREDSTOCK
COMMONSTOCK
TREASURYSTOCK
EXPENSE EXPENSE TRAVEL
ADVERTISINGPROMOTIONAL
BADDEBTS
BANKCHARGES
CHARITABLECONTRIBUTIONS
ENTERTAINMENT
ENTERTAINMENTMEALS
EQUIPMENTRENTAL
GLOBALTAXEXPENSE
INSURANCE
INTERESTPAID
LEGALPROFESSIONALFEES
OFFICEGENERALADMINISTRATIVEEXPENSES
OTHERMISCELLANEOUSSERVICECOST
PROMOTIONALMEALS
RENTORLEASEOFBUILDINGS
REPAIRMAINTENANCE
SHIPPINGFREIGHTDELIVERY
SUPPLIESMATERIALS
TRAVELMEALS
UTILITIES
AUTO
COSTOFLABOR
DUESSUBSCRIPTIONS
PAYROLLEXPENSES
TAXESPAID
OTHEREXPENSE DEPRECIATION
EXCHANGEGAINORLOSS
OTHERMISCELLANEOUSEXPENSE
PENALTIESSETTLEMENTS
AMORTIZATION
COSTOFGOODSSOLD COSTOFLABORCOS
EQUIPMENTRENTALCOS
OTHERCOSTSOFSERVICECOS
SHIPPINGFREIGHTDELIVERYCOS
SUPPLIESMATERIALSCOGS
LIABILITY ACCOUNTSPAYABLE ACCOUNTSPAYABLE
CREDITCARD CREDITCARD
LONGTERMLIABILITY NOTESPAYABLE
OTHERLONGTERMLIABILITIES
SHAREHOLDERNOTESPAYABLE
OTHERCURRENTLIABILITY OTHERCURRENTLIABILITIES
DIRECTDEPOSITPAYABLE
LINEOFCREDIT
LOANPAYABLE
GLOBALTAXPAYABLE
GLOBALTAXSUSPENSE
PAYROLLCLEARING
PAYROLLTAXPAYABLE
PREPAIDEXPENSESPAYABLE
RENTSINTRUSTLIABILITY
TRUSTACCOUNTSLIABILITIES
FEDERALINCOMETAXPAYABLE
INSURANCEPAYABLE
SALESTAXPAYABLE
STATELOCALINCOMETAXPAYABLE
REVENUE INCOME OTHERPRIMARYINCOME
NONPROFITINCOME
SALESOFPRODUCTINCOME
SERVICEFEEINCOME
DISCOUNTSREFUNDSGIVEN
OTHERINCOME OTHERINVESTMENTINCOME
DIVIDENDINCOME
INTERESTEARNED
OTHERMISCELLANEOUSINCOME
TAXEXEMPTINTEREST

Address

Sub type. Represents a postal address.

GET https://api-connec.maestrano.com/#/definitions/address
Responses200
Body
{
  "attention": "Mr John Smith",
  "line1": "Suite 102",
  "line2": "410 Elizabeth Street",
  "city": "Surry Hills",
  "region": "NSW",
  "postal_code": "2010",
  "country": "AU"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "address": {
      "type": "object",
      "properties": {
        "attention": {
          "description": "Contact name",
          "type": "string"
        },
        "attention_first_name": {
          "description": "Contact first name",
          "type": "string"
        },
        "attention_last_name": {
          "description": "Contact last name",
          "type": "string"
        },
        "line1": {
          "description": "First address line",
          "type": "string"
        },
        "line2": {
          "description": "Second address line",
          "type": "string"
        },
        "city": {
          "description": "City",
          "type": "string"
        },
        "region": {
          "description": "State, region or department",
          "type": "string"
        },
        "postal_code": {
          "description": "Zip or postal code",
          "type": "string"
        },
        "country": {
          "description": "Country alpha-2 code",
          "type": "string"
        }
      }
    }
  }
}

Address
GET/#/definitions/address

Address schema.

Attributes

Field Type Description
attention String Contact name. Concatenation of attention_first_name and attention_last_name if not provided
attention_first_name String Contact first name
attention_last_name String Contact last name
line1 String First address line
line2 String Second address line
city String City
region String State, region or department
postal_code String Zip or postal code
country String Country alpha-2 code

Address Group

Sub type. Represents shipping and billing addresses.

GET https://api-connec.maestrano.com/#/definitions/address_group
Responses200
Body
{
  "billing": {
    "line1": "Suite 102 ",
    "line2": "410 Elizabeth Street",
    "city": "Surry Hills",
    "region": "NSW",
    "postal_code": "2010",
    "country": "AU"
  },
  "billing2": {
    "line1": "3724 Divisadero Street ",
    "line2": "",
    "city": "San Francisco",
    "region": "CA",
    "postal_code": "94123",
    "country": "US"
  },
  "shipping": {
    "line1": "Suite 102 ",
    "line2": "410 Elizabeth Street",
    "city": "Surry Hills",
    "region": "NSW",
    "postal_code": "2010",
    "country": "AU"
  },
  "shipping2": {
    "line1": "Mr John Smith",
    "line2": "PO Box 99",
    "city": "Sydney",
    "region": "NSW",
    "postal_code": "2000",
    "country": "AU"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "address_group": {
      "type": "object",
      "properties": {
        "billing": {
          "description": "Primary billing address",
          "$ref": "#/definitions/address"
        },
        "billing2": {
          "description": "Secondary billing address",
          "$ref": "#/definitions/address"
        },
        "shipping": {
          "description": "Primary shipping address",
          "$ref": "#/definitions/address"
        },
        "shipping2": {
          "description": "Secondary shipping address",
          "$ref": "#/definitions/address"
        }
      }
    }
  }
}

Address Group
GET/#/definitions/address_group

Address Group schema.

Attributes

Field Type Description
billing Address Primary billing address
billing2 Address Secondary billing address
shipping Address Primary shipping address
shipping2 Address Secondary shipping address

Email Group

Sub type. Represents emails.

GET https://api-connec.maestrano.com/#/definitions/email_group
Responses200
Body
{
  "address": "john27@maestrano.com",
  "address2": "jack27@example.com"
}
Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",

    "definitions": {
      "email_group": {
        "type": "object",
        "properties": {
          "address": {
            "description": "Primary email address",
            "type": "string"
          },
          "address2": {
            "description": "Secondary email address",
            "type": "string"
          },
        }
      }
    }
}

Email Group
GET/#/definitions/email_group

Email Group schema.

Attributes

Field Type Description
address String Primary email address
address2 String Secondary email address

Price

Sub type. Represents a price detail including net, total and tax amounts.

Business Rules

The amounts and tax rates will be auto-computed in case of values missing. At the very least, one of the following attributes combinations must be provided:

  • total_amount and tax_rate

  • net_amount and tax_rate

  • net_amount and tax_amount The tax_rate may also be deduced from the associated object tax code (when applicable).

GET https://api-connec.maestrano.com/#/definitions/price
Responses200
Body
{
  "total_amount": 110,
  "net_amount": 100,
  "tax_amount": 10,
  "tax_rate": 10,
  "currency": "AUD"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "price": {
      "type": "object",
      "properties": {
        "total_amount": {
          "description": "Total amount including taxes",
          "type": "number"
        },
        "net_amount": {
          "description": "Net amount excluding taxes",
          "type": "number"
        },
        "tax_amount": {
          "description": "Total tax amount",
          "type": "number"
        },
        "tax_rate": {
          "description": "Applicable tax rate",
          "type": "number"
        },
        "currency": {
          "description": "Price currency",
          "type": "string"
        }
      }
    }
  }
}

Price
GET/#/definitions/price

Price schema.

Attributes

Field Type Description
total_amount Number Total amount including taxes
net_amount Number Net amount excluding taxes
tax_amount Number Total tax amount
tax_rate Number Applicable tax rate
currency String Price currency code

Telephone Group

Sub type. Represents phone numbers.

GET https://api-connec.maestrano.com/#/definitions/telephone_group
Responses200
Body
{
  "landline": "+61 (0) 2 9211 7532",
  "landline2": "+1 415 710 1939",
  "mobile": "+61 (0) 416 784 365",
  "mobile2": "+61 (0) 416 784 366",
  "fax": "+61 (0) 2 9211 7530",
  "fax2": "+1 415 710 1930",
  "pager": "61123456789",
  "pager2": "12481234567"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "address": {
      "type": "object",
      "properties": {
        "landline": {
          "description": "Primary phone number",
          "type": "string"
        },
        "landline2": {
          "description": "Secondary phone number",
          "type": "string"
        },
        "mobile": {
          "description": "Primary mobile number",
          "type": "string"
        },
        "mobile2": {
          "description": "Secondary mobile number",
          "type": "string"
        },
        "fax": {
          "description": "Primary fax number",
          "type": "string"
        },
        "fax2": {
          "description": "Secondary fax number",
          "type": "string"
        },
        "pager": {
          "description": "Primary pager number",
          "type": "string"
        },
        "pager2": {
          "description": "Secondary pager number",
          "type": "string"
        }
      }
    }
  }
}

Telephone Group
GET/#/definitions/telephone_group

Telephone Group schema.

Attributes

Field Type Description
landline String Primary landline number
landline2 String Secondary landline number
mobile String Primary mobile number
mobile2 String Secondary mobile number
fax String Primary fax number
fax2 String Secondary fax number
pager String Primary pager number
pager2 String Secondary pager number

Bank Account

Sub type. Represents the payment details of a bank account.

GET https://api-connec.maestrano.com/#/definitions/bank_account
Responses200
Body
{
  "bic_code": "12345-12310",
  "account_number": "78945 4410",
  "bsb_number": "123-123"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {
    "bank_account": {
      "type": "object",
      "properties": {
        "bic_code": {
          "description": "Bic code",
          "type": "string"
        },
        "account_number": {
          "description": "Account number",
          "type": "string"
        },
        "bsb_number": {
          "description": "BSB number",
          "type": "string"
        }
      }
    }
  }
}

Bank Account
GET/#/definitions/bank_account

Bank Account schema.

Attributes

Field Type Description
bic_code String Bic code
account_number String Account number
bsb_number String BSB number

Website Group

Sub type. Represents websites.

GET https://api-connec.maestrano.com/#/definitions/website_group
Responses200
Body
{
  "url": "maestrano.com",
  "url2": "enterprise.maestrano.com"
}
Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",

    "definitions": {
      "email_group": {
        "type": "object",
        "properties": {
          "url": {
            "description": "Primary website url",
            "type": "string"
          },
          "url2": {
            "description": "Secondary website url",
            "type": "string"
          },
        }
      }
    }
}

Website Group
GET/#/definitions/website_group

Website Group schema.

Attributes

Field Type Description
url String Primary website url
url2 String Secondary website url

Contact channel

Sub type. Represents ways to join the contact.

GET https://api-connec.maestrano.com/#/definitions/contact_channel
Responses200
Body
{
    "skype": "doecorp",
}
Schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",

    "definitions": {
      "contact_channel": {
        "type": "object",
        "properties": {
          "skype": {
            "description": "Skype account",
            "type": "string"
          }
        }
      }
    }
}

Contact channel
GET/#/definitions/contact_channel

Contact channel schema.

Attributes

Field Type Description
skype String Skype account

Accounts

Describe an accounting account as one would find in a Chart of Accounts.

Accounts JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/accounts
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "accounts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Account UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "Account status",
            "enum": [
              "ACTIVE",
              "INACTIVE"
            ],
            "default": "ACTIVE"
          },
          "name": {
            "description": "Account name",
            "type": "string"
          },
          "reference": {
            "description": "Account reference",
            "type": "string"
          },
          "description": {
            "description": "Account description",
            "type": "string"
          },
          "currency": {
            "description": "Account currency",
            "default": "USD",
            "type": "string"
          },
          "classification": {
            "description": "Concatenated value of the classification, type and sub type of the account",
            "type": "string"
          },
          "class": {
            "description": "Account classification. The classification is inferred by the account type if omitted on account creation",
            "enum": [
              "ASSET",
              "EQUITY",
              "EXPENSE",
              "LIABILITY",
              "REVENUE"
            ]
          },
          "type": {
            "description": "Account type",
            "enum": [
              "BANK",
              "OTHERCURRENTASSET",
              "FIXEDASSET",
              "OTHERASSET",
              "ACCOUNTSRECEIVABLE",
              "EQUITY",
              "EXPENSE",
              "OTHEREXPENSE",
              "COSTOFGOODSSOLD",
              "ACCOUNTSPAYABLE",
              "CREDITCARD",
              "LONGTERMLIABILITY",
              "OTHERCURRENTLIABILITY",
              "INCOME",
              "OTHERINCOME"
            ]
          },
          "sub_type": {
            "description": "Account sub type",
            "type": "string"
          },
          "bank_account": {
            "$ref": "#/definitions/bank_account"
          },
          "opening_balance": {
            "type": "number",
            "description": "Account opening balance"
          },
          "current_balance": {
            "type": "number",
            "description": "Account current balance"
          },
          "current_balance_with_sub_accounts": {
            "type": "number",
            "description": "Account current balance (including sub accounts balances)"
          },
          "parent_account_id": {
            "type": "string",
            "descritpion": "Id of the parent account"
          },
          "address": {
            "$ref": "#/definitions/address"
          }
        },
        "required": [
          "name",
          "type"
        ]
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "bank_account": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "bank_account": {
          "type": "object",
          "properties": {
            "bic_code": {
              "type": "string"
            },
            "account_number": {
              "type": "string"
            },
            "bsb_number": {
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/accounts

Attributes

Field Type Description
id String Account UUID
group_id String Group ID
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Unique code, auto-generated if not specified
status Account status
name String Account name
reference String Account reference
description String Account description
currency String Account currency
classification String Concatenated value of the classification, type and sub type of the account
class Account classification. The classification is inferred by the account type if omitted on account creation
type Account type
sub_type String Account sub type
bank_account Bank Account
opening_balance Number Account opening balance
current_balance Number Account current balance
current_balance_with_sub_accounts Number Account current balance (including sub accounts balances)
parent_account_id String
address Address

Accounts List

GET https://api-connec.maestrano.com/api/v2/:group_id/accounts
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "accounts": [
    {
      "id": "8b378a81-5a96-0132-3097-600308937d74",
      "group_id": "cld-f45g7f5",
      "created_at": "2014-11-30T08:12:26Z",
      "updated_at": "2014-11-30T08:12:26Z",
      "code": "ACCRCV",
      "status": "ACTIVE",
      "name": "Accounts Receivable",
      "reference": "20001",
      "description": "Accounts Receivable",
      "currency": "USD",
      "classification": "ASSET",
      "type": "ACCOUNTSRECEIVABLE",
      "sub_type": "ACCOUNTSRECEIVABLE",
      "bank_account": {
        "bic_code": "12345-12310",
        "account_number": "78945 4410",
        "bsb_number": "123-123"
      },
      "opening_balance": 0,
      "tax_code_id": "5fasdd8a1-6t86-2162-3098-600308937e98",
      "parent_account_id": "8b37d8a1-5a96-0132-3098-600308937d74",
      "address": {
        "billing": {
          "line1": "62 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2062",
          "country": "AU"
        },
        "billing2": {
          "line1": "63 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2063",
          "country": "AU"
        },
        "shipping": {
          "line1": "64 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2064",
          "country": "AU"
        },
        "shipping2": {
          "line1": "65 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2065",
          "country": "AU"
        }
      }
    }
  ]
}

Get Accounts
GET/api/v2/:group_id/accounts

Get the list of accounts.

Attributes

Field Type Description
id String Account UUID
group_id String Group ID
created_at Date-time Account creation date
updated_at Date-time Account last update date
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
name String Account name
reference String Account reference
description String Short description of the account
currency String Account currency code. The company currency is used if not provided
classification Enum Account classification. Inferred by the account type if omitted on creation
type Enum Account type. Refer to the Accounts classification section
sub_type Enum Account sub type. Refer to the Accounts classification section
opening_balance Number Account opening balance
tax_code_id Reference Id of the tax code associated with the account
parent_account_id Reference Id of the parent account
address Address group Account addresses
bank_account Bank account Account payment details

POST https://api-connec.maestrano.com/api/v2/:group_id/accounts
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "accounts": {
        "name": "Accounts Receivable",
        "code": "ACCRCV",
        "description": "Accounts Receivable",
        "status": "ACTIVE",
        "currency": "USD",
        "classification": "ASSET",
        "type": "ACCOUNTSRECEIVABLE",
        "sub_type": "ACCOUNTSRECEIVABLE",
    }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
    "accounts": {
        "id": "e32303c1-5102-0132-661e-600308937d74",
        "group_id": "cld-4d7f86",
        "created_at": "2014-12-18T03:42:45Z",
        "updated_at": "2014-12-18T03:42:45Z",
        "name": "Accounts Receivable",
        "code": "ACCRCV",
        "description": "Accounts Receivable",
        "status": "ACTIVE",
        "currency": "USD",
        "classification": "ASSET",
        "type": "ACCOUNTSRECEIVABLE",
        "sub_type": "ACCOUNTSRECEIVABLE",
    }
}

Create New Account
POST/api/v2/:group_id/accounts

Create a new account.


Account

GET https://api-connec.maestrano.com/api/v2/:group_id/accounts/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "accounts": {
    "id": "8b378a81-5a96-0132-3097-600308937d74",
    "group_id": "cld-f45g7f5",
    "created_at": "2014-11-30T08:12:26Z",
    "updated_at": "2014-11-30T08:12:26Z",
    "name": "Accounts Receivable",
    "code": "ACCRCV",
    "description": "Accounts Receivable",
    "status": "ACTIVE",
    "currency": "USD",
    "classification": "ASSET",
    "type": "ACCOUNTSRECEIVABLE",
    "sub_type": "ACCOUNTSRECEIVABLE",
    "bank_account": {
      "bic_code": "12345-12310",
      "account_number": "78945 4410",
      "bsb_number": "123-123"
    },
    "parent_account_id": "8b37d8a1-5a96-0132-3098-600308937d74",
    "address": {
      "billing": {
        "line1": "62 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2062",
        "country": "AU"
      },
      "billing2": {
        "line1": "63 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2063",
        "country": "AU"
      },
      "shipping": {
        "line1": "64 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2064",
        "country": "AU"
      },
      "shipping2": {
        "line1": "65 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2065",
        "country": "AU"
      }
    }
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Account
GET/api/v2/:group_id/accounts/{id}

Get a single account.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The account ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/accounts/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "accounts": {
    "name": "Accounts Receivable",
    "code": "ACCRCV",
    "description": "Accounts Receivable"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "accounts": {
    "id": "8b378a81-5a96-0132-3097-600308937d74",
    "group_id": "cld-f45g7f5",
    "created_at": "2014-11-30T08:12:26Z",
    "updated_at": "2014-11-30T08:12:26Z",
    "name": "Accounts Receivable",
    "code": "ACCRCV",
    "description": "Accounts Receivable",
    "status": "ACTIVE",
    "currency": "USD",
    "classification": "ASSET",
    "type": "ACCOUNTSRECEIVABLE",
    "sub_type": "ACCOUNTSRECEIVABLE",
    "bank_account": {
      "bic_code": "12345-12310",
      "account_number": "78945 4410",
      "bsb_number": "123-123"
    },
    "parent_account_id": "8b37d8a1-5a96-0132-3098-600308937d74",
    "address": {
      "billing": {
        "line1": "62 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2062",
        "country": "AU"
      },
      "billing2": {
        "line1": "63 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2063",
        "country": "AU"
      },
      "shipping": {
        "line1": "64 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2064",
        "country": "AU"
      },
      "shipping2": {
        "line1": "65 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2065",
        "country": "AU"
      }
    }
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Account
PUT/api/v2/:group_id/accounts/{id}

Update a single Account

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The account ID


AppUsers

Business Rules

  • Represents the users in the applications linked to a company

  • An Employee is not necessarily an AppUser. Example: a company that has a CRM application and an accounting package can have its accountants and its sales representatives as Employees AND AppUsers, but maybe its delivery men won’t be using any of these applications and therefore won’t be AppUsers

  • An AppUser can belong to several Teams, a Team can have several AppUsers

AppUsers List

GET https://api-connec.maestrano.com/app_users
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "app_users": [
    {
      "id": "76991ec1-ff01-0133-bfdc-5fbf8265841f",
      "code": "US4",
      "mno_user_id": "beadae47-0af6-4a3f-b7c8-b54401c717ba",
      "first_name": "User",
      "last_name": "Test",
      "role": "CEO",
      "is_admin": true,
      "email": {
        "address": "john17@maestrano.com",
        "address2": "jack17@example.com"
      },
      "address_work": {
        "billing": {
          "line1": "86 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2086",
          "country": "Australia"
        },
        "billing2": {
          "line1": "87 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2087",
          "country": "Australia"
        },
        "shipping": {
          "line1": "88 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2088",
          "country": "Australia"
        },
        "shipping2": {
          "line1": "89 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2089",
          "country": "Australia"
        }
      },
      "address_home": {
        "billing": {
          "line1": "90 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2090",
          "country": "Australia"
        },
        "billing2": {
          "line1": "91 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2091",
          "country": "Australia"
        },
        "shipping": {
          "line1": "92 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2092",
          "country": "Australia"
        },
        "shipping2": {
          "line1": "93 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2093",
          "country": "Australia"
        }
      },
      "phone_work": {
        "landline": "+61 2 8574 1222",
        "landline2": "+1 2 8574 1222",
        "mobile": "+61 449 785 122",
        "mobile2": "+1 449 785 122",
        "fax": "+61 2 9974 1222",
        "fax2": "+1 2 9974 1222",
        "pager": "+61 440 785 122",
        "pager2": "+1 440 785 122"
      },
      "phone_home": {
        "landline": "+61 2 8574 1223",
        "landline2": "+1 2 8574 1223",
        "mobile": "+61 449 785 123",
        "mobile2": "+1 449 785 123",
        "fax": "+61 2 9974 1223",
        "fax2": "+1 2 9974 1223",
        "pager": "+61 440 785 123",
        "pager2": "+1 440 785 123"
      },
      "teams": [
        {
          "id": "f811a2ca-ec61-4d2a-a987-9128a990f59b",
          "code": "TEA-1"
        }
      ],
      "group_id": "org-fbba",
      "channel_id": "org-fbba",
      "resource_type": "app_users"
    }
  ],
  "pagination": {
    "skip": 0,
    "top": 100,
    "total": 1
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "app_users": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "mno_user_id": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "is_admin": {
            "type": "boolean"
          },
          "email": {
            "type": "object",
            "properties": {
              "address": {
                "type": "string"
              },
              "address2": {
                "type": "string"
              }
            }
          },
          "address_work": {
            "type": "object",
            "properties": {
              "billing": {
                "type": "object",
                "properties": {
                  "line1": {
                    "type": "string"
                  },
                  "line2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "region": {
                    "type": "string"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  }
                }
              },
              "billing2": {
                "type": "object",
                "properties": {
                  "line1": {
                    "type": "string"
                  },
                  "line2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "region": {
                    "type": "string"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  }
                }
              },
              "shipping": {
                "type": "object",
                "properties": {
                  "line1": {
                    "type": "string"
                  },
                  "line2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "region": {
                    "type": "string"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  }
                }
              },
              "shipping2": {
                "type": "object",
                "properties": {
                  "line1": {
                    "type": "string"
                  },
                  "line2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "region": {
                    "type": "string"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "address_home": {
            "type": "object",
            "properties": {
              "billing": {
                "type": "object",
                "properties": {
                  "line1": {
                    "type": "string"
                  },
                  "line2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "region": {
                    "type": "string"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  }
                }
              },
              "billing2": {
                "type": "object",
                "properties": {
                  "line1": {
                    "type": "string"
                  },
                  "line2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "region": {
                    "type": "string"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  }
                }
              },
              "shipping": {
                "type": "object",
                "properties": {
                  "line1": {
                    "type": "string"
                  },
                  "line2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "region": {
                    "type": "string"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  }
                }
              },
              "shipping2": {
                "type": "object",
                "properties": {
                  "line1": {
                    "type": "string"
                  },
                  "line2": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "region": {
                    "type": "string"
                  },
                  "postal_code": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "phone_work": {
            "type": "object",
            "properties": {
              "landline": {
                "type": "string"
              },
              "landline2": {
                "type": "string"
              },
              "mobile": {
                "type": "string"
              },
              "mobile2": {
                "type": "string"
              },
              "fax": {
                "type": "string"
              },
              "fax2": {
                "type": "string"
              },
              "pager": {
                "type": "string"
              },
              "pager2": {
                "type": "string"
              }
            }
          },
          "phone_home": {
            "type": "object",
            "properties": {
              "landline": {
                "type": "string"
              },
              "landline2": {
                "type": "string"
              },
              "mobile": {
                "type": "string"
              },
              "mobile2": {
                "type": "string"
              },
              "fax": {
                "type": "string"
              },
              "fax2": {
                "type": "string"
              },
              "pager": {
                "type": "string"
              },
              "pager2": {
                "type": "string"
              }
            }
          },
          "teams": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                }
              }
            }
          },
          "group_id": {
            "type": "string"
          },
          "channel_id": {
            "type": "string"
          },
          "resource_type": {
            "type": "string"
          }
        }
      }
    },
    "pagination": {
      "type": "object",
      "properties": {
        "skip": {
          "type": "integer"
        },
        "top": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        }
      }
    }
  }
}

Get AppUsers
GET/app_users

List the users of your applications.

Attributes

Field Type Description
id String AppUser UUID
code String Code, auto-generated if not specified
mno_user_id Reference Id of the corresponding User in Maestrano. Should be set to the Single Sign-On user_id
first_name String User’s first name
last_name String User’s last name
role String Optional user role (as defined in the application)
is_admin Boolean Flags users that are admins in the application
email Email group User’s email
address_work Address group User’s work address
address_home Address group User’s home address
phone_work Phone group User’s work telephone number
phone_home Phone group User’s home telephone number
[teams] Array Teams the user is a member of

POST https://api-connec.maestrano.com/app_users
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "app_users": {
    "mno_user_id": "beadae47-0af6-4a3f-b7c8-b54401c717ba",
    "first_name": "User",
    "last_name": "Test",
    "role": "CEO",
    "is_admin": true,
    "email": {
      "address": "john17@maestrano.com",
      "address2": "jack17@example.com"
    },
    "address_work": {
      "billing": {
        "line1": "86 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2086",
        "country": "Australia"
      },
      "billing2": {
        "line1": "87 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2087",
        "country": "Australia"
      },
      "shipping": {
        "line1": "88 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2088",
        "country": "Australia"
      },
      "shipping2": {
        "line1": "89 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2089",
        "country": "Australia"
      }
    },
    "address_home": {
      "billing": {
        "line1": "90 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2090",
        "country": "Australia"
      },
      "billing2": {
        "line1": "91 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2091",
        "country": "Australia"
      },
      "shipping": {
        "line1": "92 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2092",
        "country": "Australia"
      },
      "shipping2": {
        "line1": "93 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2093",
        "country": "Australia"
      }
    },
    "phone_work": {
      "landline": "+61 2 8574 1222",
      "landline2": "+1 2 8574 1222",
      "mobile": "+61 449 785 122",
      "mobile2": "+1 449 785 122",
      "fax": "+61 2 9974 1222",
      "fax2": "+1 2 9974 1222",
      "pager": "+61 440 785 122",
      "pager2": "+1 440 785 122"
    },
    "phone_home": {
      "landline": "+61 2 8574 1223",
      "landline2": "+1 2 8574 1223",
      "mobile": "+61 449 785 123",
      "mobile2": "+1 449 785 123",
      "fax": "+61 2 9974 1223",
      "fax2": "+1 2 9974 1223",
      "pager": "+61 440 785 123",
      "pager2": "+1 440 785 123"
    },
    "teams": [
      {
        "id": "f811a2ca-ec61-4d2a-a987-9128a990f59b",
        "code": "TEA-1"
      }
    ]
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "app_users": {
    "id": "76991ec1-ff01-0133-bfdc-5fbf8265841f",
    "code": "US4",
    "mno_user_id": "beadae47-0af6-4a3f-b7c8-b54401c717ba",
    "first_name": "User",
    "last_name": "Test",
    "role": "CEO",
    "is_admin": true,
    "email": {
      "address": "john17@maestrano.com",
      "address2": "jack17@example.com"
    },
    "address_work": {
      "billing": {
        "line1": "86 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2086",
        "country": "Australia"
      },
      "billing2": {
        "line1": "87 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2087",
        "country": "Australia"
      },
      "shipping": {
        "line1": "88 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2088",
        "country": "Australia"
      },
      "shipping2": {
        "line1": "89 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2089",
        "country": "Australia"
      }
    },
    "address_home": {
      "billing": {
        "line1": "90 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2090",
        "country": "Australia"
      },
      "billing2": {
        "line1": "91 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2091",
        "country": "Australia"
      },
      "shipping": {
        "line1": "92 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2092",
        "country": "Australia"
      },
      "shipping2": {
        "line1": "93 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2093",
        "country": "Australia"
      }
    },
    "phone_work": {
      "landline": "+61 2 8574 1222",
      "landline2": "+1 2 8574 1222",
      "mobile": "+61 449 785 122",
      "mobile2": "+1 449 785 122",
      "fax": "+61 2 9974 1222",
      "fax2": "+1 2 9974 1222",
      "pager": "+61 440 785 122",
      "pager2": "+1 440 785 122"
    },
    "phone_home": {
      "landline": "+61 2 8574 1223",
      "landline2": "+1 2 8574 1223",
      "mobile": "+61 449 785 123",
      "mobile2": "+1 449 785 123",
      "fax": "+61 2 9974 1223",
      "fax2": "+1 2 9974 1223",
      "pager": "+61 440 785 123",
      "pager2": "+1 440 785 123"
    },
    "teams": [
      {
        "id": "f811a2ca-ec61-4d2a-a987-9128a990f59b",
        "code": "TEA-1"
      }
    ],
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "app_users"
  }
}

Create New AppUser
POST/app_users

Create a new AppUser.


AppUser

GET https://api-connec.maestrano.com/app_users/76991ec1-ff01-0133-bfdc-5fbf8265841f
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "app_users": {
    "id": "76991ec1-ff01-0133-bfdc-5fbf8265841f",
    "code": "US4",
    "mno_user_id": "beadae47-0af6-4a3f-b7c8-b54401c717ba",
    "first_name": "User",
    "last_name": "Test",
    "role": "CEO",
    "is_admin": true,
    "email": {
      "address": "john17@maestrano.com",
      "address2": "jack17@example.com"
    },
    "address_work": {
      "billing": {
        "line1": "86 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2086",
        "country": "Australia"
      },
      "billing2": {
        "line1": "87 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2087",
        "country": "Australia"
      },
      "shipping": {
        "line1": "88 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2088",
        "country": "Australia"
      },
      "shipping2": {
        "line1": "89 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2089",
        "country": "Australia"
      }
    },
    "address_home": {
      "billing": {
        "line1": "90 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2090",
        "country": "Australia"
      },
      "billing2": {
        "line1": "91 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2091",
        "country": "Australia"
      },
      "shipping": {
        "line1": "92 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2092",
        "country": "Australia"
      },
      "shipping2": {
        "line1": "93 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2093",
        "country": "Australia"
      }
    },
    "phone_work": {
      "landline": "+61 2 8574 1222",
      "landline2": "+1 2 8574 1222",
      "mobile": "+61 449 785 122",
      "mobile2": "+1 449 785 122",
      "fax": "+61 2 9974 1222",
      "fax2": "+1 2 9974 1222",
      "pager": "+61 440 785 122",
      "pager2": "+1 440 785 122"
    },
    "phone_home": {
      "landline": "+61 2 8574 1223",
      "landline2": "+1 2 8574 1223",
      "mobile": "+61 449 785 123",
      "mobile2": "+1 449 785 123",
      "fax": "+61 2 9974 1223",
      "fax2": "+1 2 9974 1223",
      "pager": "+61 440 785 123",
      "pager2": "+1 440 785 123"
    },
    "teams": [
      {
        "id": "f811a2ca-ec61-4d2a-a987-9128a990f59b",
        "code": "TEA-1"
      }
    ],
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "app_users"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "76991ec1-ff01-0133-bfdc-5fbf8265841f",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get AppUser
GET/app_users/{id}

Get a single app user.

URI Parameters
HideShow
id
string (required) Example: 76991ec1-ff01-0133-bfdc-5fbf8265841f

The app user ID


PUT https://api-connec.maestrano.com/app_users/76991ec1-ff01-0133-bfdc-5fbf8265841f
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "app_users": {
    "first_name": "User2",
    "last_name": "Test2"
  }
}
Responses200404
Body
{
  "app_users": {
    "id": "76991ec1-ff01-0133-bfdc-5fbf8265841f",
    "code": "US4",
    "mno_user_id": "beadae47-0af6-4a3f-b7c8-b54401c717ba",
    "first_name": "User2",
    "last_name": "Test2",
    "role": "CEO",
    "is_admin": true,
    "email": {
      "address": "john17@maestrano.com",
      "address2": "jack17@example.com"
    },
    "address_work": {
      "billing": {
        "line1": "86 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2086",
        "country": "Australia"
      },
      "billing2": {
        "line1": "87 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2087",
        "country": "Australia"
      },
      "shipping": {
        "line1": "88 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2088",
        "country": "Australia"
      },
      "shipping2": {
        "line1": "89 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2089",
        "country": "Australia"
      }
    },
    "address_home": {
      "billing": {
        "line1": "90 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2090",
        "country": "Australia"
      },
      "billing2": {
        "line1": "91 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2091",
        "country": "Australia"
      },
      "shipping": {
        "line1": "92 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2092",
        "country": "Australia"
      },
      "shipping2": {
        "line1": "93 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2093",
        "country": "Australia"
      }
    },
    "phone_work": {
      "landline": "+61 2 8574 1222",
      "landline2": "+1 2 8574 1222",
      "mobile": "+61 449 785 122",
      "mobile2": "+1 449 785 122",
      "fax": "+61 2 9974 1222",
      "fax2": "+1 2 9974 1222",
      "pager": "+61 440 785 122",
      "pager2": "+1 440 785 122"
    },
    "phone_home": {
      "landline": "+61 2 8574 1223",
      "landline2": "+1 2 8574 1223",
      "mobile": "+61 449 785 123",
      "mobile2": "+1 449 785 123",
      "fax": "+61 2 9974 1223",
      "fax2": "+1 2 9974 1223",
      "pager": "+61 440 785 123",
      "pager2": "+1 440 785 123"
    },
    "teams": [
      {
        "id": "f811a2ca-ec61-4d2a-a987-9128a990f59b",
        "code": "TEA-1"
      }
    ],
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "app_users"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "76991ec1-ff01-0133-bfdc-5fbf8265841f",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an AppUser
PUT/app_users/{id}

Update a single AppUser.

URI Parameters
HideShow
id
string (required) Example: 76991ec1-ff01-0133-bfdc-5fbf8265841f

The app user ID


Bank Transactions

Business Rules

A Bank Transaction represents a transaction made to receive or spend money directly to/from a Bank account. As per any other transaction type, a Bank Transaction will be related to an account and a contact (Person / Organization), and will have some Journals attached.

Bank Transactions JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/bank_transactions
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "bank_transactions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Bank transaction UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "title": {
            "description": "Bank transaction friendly name",
            "type": "string"
          },
          "transaction_date": {
            "description": "Bank transaction creation date, defaults to today if not specified",
            "type": "date-time"
          },
          "status": {
            "description": "Bank transaction status",
            "enum": [
              "AUTHORISED",
              "INACTIVE"
            ],
            "default": "AUTHORISED"
          },
          "type": {
            "description": "Bank transaction type indicates if it is a RECEIVE or SPEND transaction",
            "enum": [
              "RECEIVE",
              "SPEND"
            ],
            "default": "RECEIVE"
          },
          "organization_id": {
            "description": "Reference of the Organization that originated the transaction",
            "type": "string"
          },
          "person_id": {
            "description": "Reference of the Person that originated the transaction",
            "type": "string"
          },
          "tax_code_id": {
            "description": "Reference of the applicable Tax Code",
            "type": "string"
          },
          "account_id": {
            "description": "Reference of the Account used for the Bank transaction",
            "type": "string"
          },
          "tax_calculation": {
            "description": "Tax calculation method for display purpose",
            "enum": [
              "TAX_EXCLUDED",
              "TAX_INCLUSIVE",
              "NOT_APPLICABLE"
            ]
          },
          "public_note": {
            "description": "Note visible to the customer on the Bank transaction",
            "type": "string"
          },
          "private_note": {
            "description": "Internal note not visible to the customer",
            "type": "string"
          },
          "amount": {
            "$ref": "#/definitions/price",
            "readOnly": true
          },
          "lines": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "Transaction line ID",
                    "type": "string"
                  },
                  "line_number": {
                    "description": "Transaction line number used for ordering",
                    "type": "integer"
                  },
                  "description": {
                    "description": "Transaction line description",
                    "type": "string"
                  },
                  "status": {
                    "description": "Transaction line status",
                    "enum": [
                      "ACTIVE",
                      "INACTIVE"
                    ],
                    "default": "ACTIVE"
                  },
                  "quantity": {
                    "description": "Quantity of Items",
                    "type": "number"
                  },
                  "reduction_percent": {
                    "description": "Reduction percentage applicable",
                    "type": "number"
                  },
                  "unit_price": {
                    "$ref": "#/definitions/price"
                  },
                  "total_price": {
                    "$ref": "#/definitions/price",
                    "readOnly": true
                  },
                  "service_date": {
                    "description": "Delivery date of the item/service",
                    "type": "string",
                    "format": "date-time"
                  },
                  "tax_code_id": {
                    "description": "Reference to the Tax Code applicable on the transaction line",
                    "type": "string"
                  },
                  "item_id": {
                    "description": "Reference to the Item of the transaction line",
                    "type": "string"
                  },
                  "account_id": {
                    "description": "Reference to the Account of the transaction line",
                    "type": "string"
                  },
                  "organization_id": {
                    "description": "Reference of the Customer or Supplier applicable to the transaction line",
                    "type": "string"
                  },
                  "payment_method_id": {
                    "description": "Reference to the Payment Method of the transaction line",
                    "type": "string"
                  },
                  "linked_transactions": {
                    "type": "array",
                    "items": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "description": "LinkedTransaction line ID",
                            "type": "string"
                          },
                          "applied_amount": {
                            "description": "Amount applied on the linked transaction",
                            "type": "number"
                          },
                          "transactionable_id": {
                            "description": "Reference to the Transaction UUID",
                            "type": "string"
                          },
                          "transactionable_type": {
                            "description": "Reference to the Transaction type (Bank transaction, Payment, CreditNote, etc...)",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/bank_transactions

Attributes

Field Type Description
id String Bank transaction UUID
group_id String Group ID
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Unique code, auto-generated if not specified
title String Bank transaction friendly name
transaction_date Date Time Bank transaction creation date, defaults to today if not specified
status Bank transaction status
type Bank transaction type indicates if it is a RECEIVE or SPEND transaction
organization_id String Reference of the Organization that originated the transaction
person_id String Reference of the Person that originated the transaction
tax_code_id String Reference of the applicable Tax Code
account_id String Reference of the Account used for the Bank transaction
tax_calculation Tax calculation method for display purpose
public_note String Note visible to the customer on the Bank transaction
private_note String Internal note not visible to the customer
amount Price
lines Array
BankTransactions Lines attributes
Field Type Description
id String Transaction line ID
line_number Integer Transaction line number used for ordering
description String Transaction line description
status Transaction line status
quantity Number Quantity of Items
reduction_percent Number Reduction percentage applicable
unit_price Price
total_price Price
service_date Date Time Delivery date of the item/service
tax_code_id String Reference to the Tax Code applicable on the transaction line
item_id String Reference to the Item of the transaction line
account_id String Reference to the Account of the transaction line
organization_id String Reference of the Customer or Supplier applicable to the transaction line
payment_method_id String Reference to the Payment Method of the transaction line
linked_transactions Array
BankTransactions LinkedTransactions attributes
Field Type Description
id String LinkedTransaction line ID
applied_amount Number Amount applied on the linked transaction
transactionable_id String Reference to the Transaction UUID
transactionable_type String Reference to the Transaction type (Bank transaction, Payment, CreditNote, etc…)

Bank Transactions List

GET https://api-connec.maestrano.com/api/v2/:group_id/bank_transactions
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
    "bank_transactions": [
        {
            "id"=>"6d0d64ad-3297-4e34-bee8-eb90dac34ae2",
            "account_id"=>"qwertyui-3297-4e34-bee8-eb90dac34ae2",
            "code"=>"BT001",
            "title"=>"Bank transaction",
            "transaction_date"=>"2015-01-12T00:00:00Z",
            "status"=>"AUTHORISED",
            "type"=>"RECEIVE",
            "amount"=>{
                "total_amount"=>26.0,
                "net_amount"=>26.0,
                "tax_amount"=>0.0,
                "tax_rate"=>0.0,
                "currency"=>"USD"
            },
            "currency_rate"=>1.0,
            "organization_id"=>"4d0078b2-e724-4abb-a8a7-d6bf65c122be",
            "person_id"=>"b3d0c280-5a96-0132-30cd-600308937d74",
            "is_reconciled"=>true,
            "lines"=>[
                {
                    "id"=>"line01",
                    "line_number"=>1,
                    "status"=>"ACTIVE",
                    "quantity"=>1.0,
                    "unit_price"=>{
                      "total_amount"=>10.0,
                      "net_amount"=>10.0,
                      "tax_amount"=>0.0,
                      "tax_rate"=>0.0,
                      "currency"=>"USD"
                    },
                    "total_price"=>{
                      "total_amount"=>10.0,
                      "net_amount"=>10.0,
                      "tax_amount"=>0.0,
                      "tax_rate"=>0.0,
                      "currency"=>"USD"
                    },
                    "tax_code_id"=>"b3d88ac1-5a96-0132-30d1-600308937d74",
                    "item_id"=>"b3d52f61-5a96-0132-30ce-600308937d74"
                },
                {
                    "id"=>"line02",
                    "line_number"=>2,
                    "status"=>"ACTIVE",
                    "quantity"=>2.0,
                    "unit_price"=>{
                        "total_amount"=>8.0,
                        "net_amount"=>8.0,
                        "tax_amount"=>0.0,
                        "tax_rate"=>0.0,
                        "currency"=>"USD"
                    },
                    "total_price"=>{
                        "total_amount"=>16.0,
                        "net_amount"=>16.0,
                        "tax_amount"=>0.0,
                        "tax_rate"=>0.0,
                        "currency"=>"USD"
                    },
                    "tax_code_id"=>"b3d88ac1-5a96-0132-30d1-600308937d74",
                    "item_id"=>"b3d6dd11-5a96-0132-30cf-600308937d74"
                }
            ],
            "created_at": "2014-11-30T08:13:34Z",
            "updated_at": "2014-11-30T08:13:34Z"
        }
    ]
}

Get Bank Transactions
GET/api/v2/:group_id/bank_transactions

Get the list of Bank Transactions.


POST https://api-connec.maestrano.com/api/v2/:group_id/bank_transactions
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "bank_transactions": {
        "transaction_date" => "2014-01-14T13:00:00Z",
        "status" => 'INACTIVE',
        'type' => 'RECEIVE-TRANSFER',
        'organization_id' => "4d0078b2-e724-4abb-a8a7-d6bf65c122be",
        'account_id' => "qwertyui-3297-4e34-bee8-eb90dac34ae2",
        'currency_rate' => 0.647,
        'is_reconciled' => false,
        'lines' => [
            {
                "line_number" => 1,
                "quantity" => 10.0,
                "unit_price"=>{
                    "net_amount"=>36.0,
                    "tax_rate"=>10.0,
                    "currency"=>"USD"
                },
                "item_id" => "b3d52f61-5a96-0132-30ce-600308937d74"
            },
            {
                "line_number" => 2,
                "quantity" => 1.0,
                "unit_price"=>{
                    "net_amount"=>27.0,
                    "tax_rate"=>10.0,
                    "currency"=>"USD"
                },
                "item_id" => "b3d6dd11-5a96-0132-30cf-600308937d74"
              }
        ]
    }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
    "bank_transactions": {
        "id"=>"6d0d64ad-3297-4e34-bee8-eb90dac34ae2",
        "account_id"=>"qwertyui-3297-4e34-bee8-eb90dac34ae2",
        "code"=>"BT001",
        "title"=>"Bank transaction",
        "transaction_date"=>"2015-01-12T00:00:00Z",
        "status"=>"AUTHORISED",
        "type"=>"RECEIVE",
        "amount"=>{
            "total_amount"=>425.7,
            "net_amount"=>387.0,
            "tax_amount"=>38.7,
            "tax_rate"=>10.0,
            "currency"=>"USD"
        },
        "currency_rate"=>1.0,
        "organization_id"=>"4d0078b2-e724-4abb-a8a7-d6bf65c122be",
        "person_id"=>"b3d0c280-5a96-0132-30cd-600308937d74",
        "is_reconciled"=>true,
        "lines"=>[
            {
                "id"=>"line01",
                "line_number"=>1,
                "status"=>"ACTIVE",
                "quantity"=>10.0,
                "unit_price"=>{
                  "total_amount"=>39.6,
                  "net_amount"=>36.0,
                  "tax_amount"=>3.6,
                  "tax_rate"=>10.0,
                  "currency"=>"USD"
                },
                "total_price"=>{
                  "total_amount"=>396.0,
                  "net_amount"=>360.0,
                  "tax_amount"=>36.0,
                  "tax_rate"=>10.0,
                  "currency"=>"USD"
                },
                "tax_code_id"=>"b3d88ac1-5a96-0132-30d1-600308937d74",
                "item_id"=>"b3d52f61-5a96-0132-30ce-600308937d74"
            },
            {
                "id"=>"line02",
                "line_number"=>2,
                "status"=>"ACTIVE",
                "quantity"=>1.0,
                "unit_price"=>{
                    "total_amount"=>29.7,
                    "net_amount"=>27.0,
                    "tax_amount"=>2.7,
                    "tax_rate"=>10.0,
                    "currency"=>"USD"
                },
                "total_price"=>{
                    "total_amount"=>29.7,
                    "net_amount"=>27.0,
                    "tax_amount"=>2.7,
                    "tax_rate"=>10.0,
                    "currency"=>"USD"
                },
                "tax_code_id"=>"b3d88ac1-5a96-0132-30d1-600308937d74",
                "item_id"=>"b3d6dd11-5a96-0132-30cf-600308937d74"
            }
        ],
        "created_at": "2014-11-30T08:13:34Z",
        "updated_at": "2014-11-30T08:13:34Z"
    }
}

Create New Bank Transaction
POST/api/v2/:group_id/bank_transactions

Create a new Bank Transaction.


Bank Transaction

GET https://api-connec.maestrano.com/api/v2/:group_id/bank_transactions/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
    "bank_transactions": {
        "id"=>"6d0d64ad-3297-4e34-bee8-eb90dac34ae2",
        "account_id"=>"qwertyui-3297-4e34-bee8-eb90dac34ae2",
        "code"=>"BT001",
        "title"=>"Bank transaction",
        "transaction_date"=>"2015-01-12T00:00:00Z",
        "status"=>"AUTHORISED",
        "type"=>"RECEIVE",
        "amount"=>{
            "total_amount"=>26.0,
            "net_amount"=>26.0,
            "tax_amount"=>0.0,
            "tax_rate"=>0.0,
            "currency"=>"USD"
        },
        "currency_rate"=>1.0,
        "organization_id"=>"4d0078b2-e724-4abb-a8a7-d6bf65c122be",
        "person_id"=>"b3d0c280-5a96-0132-30cd-600308937d74",
        "is_reconciled"=>true,
        "lines"=>[
            {
                "id"=>"line01",
                "line_number"=>1,
                "status"=>"ACTIVE",
                "quantity"=>1.0,
                "unit_price"=>{
                  "total_amount"=>10.0,
                  "net_amount"=>10.0,
                  "tax_amount"=>0.0,
                  "tax_rate"=>0.0,
                  "currency"=>"USD"
                },
                "total_price"=>{
                  "total_amount"=>10.0,
                  "net_amount"=>10.0,
                  "tax_amount"=>0.0,
                  "tax_rate"=>0.0,
                  "currency"=>"USD"
                },
                "tax_code_id"=>"b3d88ac1-5a96-0132-30d1-600308937d74",
                "item_id"=>"b3d52f61-5a96-0132-30ce-600308937d74"
            },
            {
                "id"=>"line02",
                "line_number"=>2,
                "status"=>"ACTIVE",
                "quantity"=>2.0,
                "unit_price"=>{
                    "total_amount"=>8.0,
                    "net_amount"=>8.0,
                    "tax_amount"=>0.0,
                    "tax_rate"=>0.0,
                    "currency"=>"USD"
                },
                "total_price"=>{
                    "total_amount"=>16.0,
                    "net_amount"=>16.0,
                    "tax_amount"=>0.0,
                    "tax_rate"=>0.0,
                    "currency"=>"USD"
                },
                "tax_code_id"=>"b3d88ac1-5a96-0132-30d1-600308937d74",
                "item_id"=>"b3d6dd11-5a96-0132-30cf-600308937d74"
            }
        ],
        "created_at": "2014-11-30T08:13:34Z",
        "updated_at": "2014-11-30T08:13:34Z"
    }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Bank Transaction
GET/api/v2/:group_id/bank_transactions/{id}

Get a single Bank Transaction.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The Bank Transaction ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/bank_transactions/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "bank_transactions": {
        "due_date": "2015-31-01T00:00:00Z",
        "status": "INACTIVE",
        "lines: [
            {
                "id": "54b323b30202cbd6da000be5",
                "quantity": 6
            }
        }
    }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
    "bank_transactions": {
        "id"=>"6d0d64ad-3297-4e34-bee8-eb90dac34ae2",
        "account_id"=>"qwertyui-3297-4e34-bee8-eb90dac34ae2",
        "code"=>"BT001",
        "title"=>"Bank transaction",
        "transaction_date"=>"2015-01-12T00:00:00Z",
        "status"=>"AUTHORISED",
        "type"=>"RECEIVE",
        "amount"=>{
            "total_amount"=>26.0,
            "net_amount"=>26.0,
            "tax_amount"=>0.0,
            "tax_rate"=>0.0,
            "currency"=>"USD"
        },
        "currency_rate"=>1.0,
        "organization_id"=>"4d0078b2-e724-4abb-a8a7-d6bf65c122be",
        "person_id"=>"b3d0c280-5a96-0132-30cd-600308937d74",
        "is_reconciled"=>true,
        "lines"=>[
            {
                "id"=>"line01",
                "line_number"=>1,
                "status"=>"ACTIVE",
                "quantity"=>1.0,
                "unit_price"=>{
                  "total_amount"=>10.0,
                  "net_amount"=>10.0,
                  "tax_amount"=>0.0,
                  "tax_rate"=>0.0,
                  "currency"=>"USD"
                },
                "total_price"=>{
                  "total_amount"=>10.0,
                  "net_amount"=>10.0,
                  "tax_amount"=>0.0,
                  "tax_rate"=>0.0,
                  "currency"=>"USD"
                },
                "tax_code_id"=>"b3d88ac1-5a96-0132-30d1-600308937d74",
                "item_id"=>"b3d52f61-5a96-0132-30ce-600308937d74"
            },
            {
                "id"=>"line02",
                "line_number"=>2,
                "status"=>"ACTIVE",
                "quantity"=>2.0,
                "unit_price"=>{
                    "total_amount"=>8.0,
                    "net_amount"=>8.0,
                    "tax_amount"=>0.0,
                    "tax_rate"=>0.0,
                    "currency"=>"USD"
                },
                "total_price"=>{
                    "total_amount"=>16.0,
                    "net_amount"=>16.0,
                    "tax_amount"=>0.0,
                    "tax_rate"=>0.0,
                    "currency"=>"USD"
                },
                "tax_code_id"=>"b3d88ac1-5a96-0132-30d1-600308937d74",
                "item_id"=>"b3d6dd11-5a96-0132-30cf-600308937d74"
            }
        ],
        "created_at": "2014-11-30T08:13:34Z",
        "updated_at": "2014-11-30T08:13:34Z"
    }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a Bank Transaction
PUT/api/v2/:group_id/bank_transactions/{id}

Update a single Bank Transaction. For a bank transaction line to be deleted, the status of the line must be set to “INACTIVE”

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The Bank Transaction ID


Company

This is the actual customer company - only one company exists per group_id.

Business Rules

name is mandatory

logo information is read-only

Company JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/company
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "company": {
      "type": "object",
      "required": [
        "name"
      ],
      "uniq": [
        "id"
      ],
      "properties": {
        "resource_type": {
          "description": "Resource type name",
          "type": "string",
          "readOnly": true
        },
        "id": {
          "description": "Company UUID",
          "type": "string",
          "readOnly": true
        },
        "channel_id": {
          "description": "Channel ID (org-xxx)",
          "type": "string",
          "readOnly": true
        },
        "group_id": {
          "description": "Group ID (cld-xxx)",
          "type": "string",
          "readOnly": true
        },
        "created_at": {
          "description": "Company creation timestamp",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "updated_at": {
          "description": "Company last update timestamp",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "name": {
          "description": "Company name",
          "type": "string"
        },
        "currency": {
          "description": "Company currency (default: USD)",
          "default": "USD",
          "type": "string"
        },
        "note": {
          "description": "Note associated to the Company",
          "type": "string"
        },
        "timezone": {
          "description": "Company timezone in TZ format (e.g. Australia/Sydney). See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones",
          "type": "string"
        },
        "industry": {
          "description": "Company industry sector",
          "type": "string"
        },
        "managers": {
          "description": "Company managers (CEO name, ...)",
          "type": "string"
        },
        "capital": {
          "description": "Company capital",
          "type": "number"
        },
        "juridical_status": {
          "description": "Company juridical status (pty, ltd, ...)",
          "type": "string"
        },
        "tax_number": {
          "description": "Company tax number (TFN, TIN, ...)",
          "type": "string"
        },
        "business_number": {
          "description": "Company unique business number (ABN in Australia)",
          "type": "string"
        },
        "employer_id": {
          "description": "Company employer id (EIN in the US)",
          "type": "string"
        },
        "fiscal_year_first_month": {
          "description": "First month of the company fiscal year",
          "type": "string"
        },
        "email": {
          "description": "Company email addresses",
          "$ref": "#/definitions/email"
        },
        "address": {
          "description": "Company addresses",
          "$ref": "#/definitions/address"
        },
        "website": {
          "description": "Company websites",
          "$ref": "#/definitions/website"
        },
        "phone": {
          "description": "Company phone and fax numbers",
          "$ref": "#/definitions/phone"
        },
        "logo": {
          "type": "object",
          "properties": {
            "logo": {
              "description": "Absolute URL to the Company logo",
              "type": "string",
              "readOnly": true
            },
            "thumb": {
              "description": "Absolute URL to the Company logo thumb (64x64)",
              "type": "string",
              "readOnly": true
            },
            "mini_thumb": {
              "description": "Absolute URL to the Company logo mni thumb (40x40)",
              "type": "string",
              "readOnly": true
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/company

Attributes

Field Type Description
resource_type String Resource type name
id String Company UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Company creation timestamp
updated_at Date Time Company last update timestamp
name String Company name
currency String Company currency (default: USD)
note String Note associated to the Company
timezone String Company timezone in TZ format (e.g. Australia/Sydney). See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
industry String Company industry sector
managers String Company managers (CEO name, …)
capital Number Company capital
juridical_status String Company juridical status (pty, ltd, …)
tax_number String Company tax number (TFN, TIN, …)
business_number String Company unique business number (ABN in Australia)
employer_id String Company employer id (EIN in the US)
fiscal_year_first_month String First month of the company fiscal year
email Email Company email addresses
address Address Company addresses
website Website Company websites
phone Phone Company phone and fax numbers
logo Object
Company Logo attributes
Field Type Description
logo String Absolute URL to the Company logo
thumb String Absolute URL to the Company logo thumb (64x64)
mini_thumb String Absolute URL to the Company logo mni thumb (40x40)
Company Logo attributes
Field Type Description
logo String Absolute URL to the Company logo
thumb String Absolute URL to the Company logo thumb (64x64)
mini_thumb String Absolute URL to the Company logo mni thumb (40x40)

Company

GET https://api-connec.maestrano.com/api/v2/:group_id/company
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "company": {
    "id": "5724bcf1-5103-0132-6651-600308937d74",
    "group_id": "cld-7gr8e5",
    "created_at": "2014-11-18T03:45:59Z",
    "updated_at": "2014-11-18T03:45:59Z",
    "name": "My Company",
    "currency": "USD",
    "note": "This is my own company profile",
    "timezone": "Australia/Sydney",
    "industry": "IT",
    "managers": "John Doe (CTO)",
    "capital": 42000,
    "juridical_status": "Pty",
    "tax_number": "01234567891",
    "business_number": "01234567891",
    "employer_id": "01234567891",
    "fiscal_year_first_month": "January",
    "email": {
      "address": "john27@maestrano.com",
      "address2": "jack27@example.com"
    },
    "address": {
      "billing": {
        "line1": "118 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2118",
        "country": "AU"
      },
      "billing2": {
        "line1": "119 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2119",
        "country": "AU"
      },
      "shipping": {
        "line1": "120 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2120",
        "country": "AU"
      },
      "shipping2": {
        "line1": "121 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2121",
        "country": "AU"
      }
    },
    "website": {
      "url": "www.website27.com",
      "url2": "www.mywebsite27.com"
    },
    "phone": {
      "landline": "+61 2 8574 1230",
      "landline2": "+1 2 8574 1230",
      "mobile": "+61 449 785 130",
      "mobile2": "+1 449 785 130",
      "fax": "+61 2 9974 1230",
      "fax2": "+1 2 9974 1230",
      "pager": "+61 440 785 130",
      "pager2": "+1 440 785 130"
    },
    "logo": {
      "logo": "http://s3.images/logo.png",
      "thumb": "http://s3.images/thumb.png",
      "mini_thumb": "http://s3.images/mini_thumb.png"
    }
  }
}

Get Company
GET/api/v2/:group_id/company

Get the company.


PUT https://api-connec.maestrano.com/api/v2/:group_id/company
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "company": {
        "name": "My Company",
        "note": "This is my own company profile",
    }

}
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "company": {
    "id": "5724bcf1-5103-0132-6651-600308937d74",
    "group_id": "cld-7gr8e5",
    "created_at": "2014-11-18T03:45:59Z",
    "updated_at": "2014-11-18T03:45:59Z",
    "name": "My Company",
    "currency": "USD",
    "note": "This is my own company profile",
    "timezone": "Australia/Sydney",
    "industry": "IT",
    "managers": "John Doe (CTO)",
    "capital": 42000,
    "juridical_status": "Pty",
    "tax_number": "01234567891",
    "business_number": "01234567891",
    "employer_id": "01234567891",
    "fiscal_year_first_month": "January",
    "email": {
      "address": "john27@maestrano.com",
      "address2": "jack27@example.com"
    },
    "address": {
      "billing": {
        "line1": "118 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2118",
        "country": "AU"
      },
      "billing2": {
        "line1": "119 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2119",
        "country": "AU"
      },
      "shipping": {
        "line1": "120 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2120",
        "country": "AU"
      },
      "shipping2": {
        "line1": "121 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2121",
        "country": "AU"
      }
    },
    "website": {
      "url": "www.website27.com",
      "url2": "www.mywebsite27.com"
    },
    "phone": {
      "landline": "+61 2 8574 1230",
      "landline2": "+1 2 8574 1230",
      "mobile": "+61 449 785 130",
      "mobile2": "+1 449 785 130",
      "fax": "+61 2 9974 1230",
      "fax2": "+1 2 9974 1230",
      "pager": "+61 440 785 130",
      "pager2": "+1 440 785 130"
    },
    "logo": {
      "logo": "http://s3.images/logo.png",
      "thumb": "http://s3.images/thumb.png",
      "mini_thumb": "http://s3.images/mini_thumb.png"
    }
  }
}

Update Company
PUT/api/v2/:group_id/company

Update the company


Contacts

A Contact represent an individual contact or an organization and can be flagged as customer, supplier and lead. Contacts may have a parent Contact to represent a hierarchical structure. As an example, an organization would be the parent contact of all individual contacts belonging to it.

Contacts JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/contacts
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "people": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Contact UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
            "type": "string",
            "format": "enum"
          },
          "title": {
            "description": "Contact title (Mr, Mrs, ...)",
            "type": "string"
          },
          "first_name": {
            "description": "Contact first name",
            "type": "string"
          },
          "last_name": {
            "description": "Contact last name",
            "type": "string"
          },
          "job_title": {
            "description": "Contact job title",
            "type": "string"
          },
          "birth_date": {
            "description": "Contact date of birth",
            "type": "string",
            "format": "date-time"
          },
          "organization_id": {
            "description": "#Organization the person belongs to",
            "type": "string",
            "format": "reference"
          },
          "is_customer": {
            "description": "Contact is classified as a Customer",
            "type": "boolean"
          },
          "is_supplier": {
            "description": "Contact is classified as a Supplier",
            "type": "boolean"
          },
          "is_lead": {
            "description": "Contact is classified as a Lead",
            "type": "boolean"
          },
          "is_organization": {
            "description": "Contact is an organization",
            "type": "boolean"
          },
          "is_person": {
            "description": "Contact is a Person (individual)",
            "type": "boolean"
          },
          "contact_channel": {
            "description": "Channels to join the contact",
            "$ref": "#/definitions/contact_channel"
          },
          "address_work": {
            "description": "Contact work address",
            "$ref": "#/definitions/address"
          },
          "address_home": {
            "description": "Contact home address",
            "$ref": "#/definitions/address"
          },
          "email": {
            "description": "Contact email addresses",
            "$ref": "#/definitions/email"
          },
          "website": {
            "description": "Contact websites",
            "$ref": "#/definitions/website"
          },
          "phone_work": {
            "description": "Contact work phone and fax numbers",
            "$ref": "#/definitions/phone"
          },
          "phone_home": {
            "description": "Contact home phone and fax numbers",
            "$ref": "#/definitions/phone"
          },
          "lead_status": {
            "description": "Lead status as defined in the CRM application",
            "type": "string"
          },
          "lead_source": {
            "description": "Lead origin as defined in the CRM application",
            "type": "string"
          },
          "lead_status_changes": {
            "description": "History track of the lead statuses",
            "type": "array",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "description": "Lead satus",
                  "type": "string"
                },
                "created_at": {
                  "description": "Date of the lead status change",
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "lead_referent_type": {
            "description": "Entity type of the lead’s referent [Person,Organization]",
            "type": "string",
            "format": "enum"
          },
          "lead_referent_id": {
            "description": "Lead’s referent, can be a #Person or an #Organization",
            "type": "string",
            "format": "reference"
          },
          "assignee_type": {
            "description": "Entity type of the lead’s assignee [AppUser, Team]",
            "type": "string",
            "format": "enum"
          },
          "assignee_id": {
            "description": "Lead’s assignee can be an #AppUser or a #Team",
            "type": "string",
            "format": "reference"
          },
          "notes": {
            "description": "Notes about the person",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "Note id",
                  "type": "string"
                },
                "description": {
                  "description": "Note content",
                  "type": "string"
                },
                "tag": {
                  "description": "Note tag",
                  "type": "string"
                },
                "value": {
                  "description": "Note value",
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/contacts

Attributes

Field Type Description
resource_type String Resource type name
id String Contact UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
title String Contact title (Mr, Mrs, …)
first_name String Contact first name
last_name String Contact last name
job_title String Contact job title
birth_date Date Time Contact date of birth
organization_id Reference Organization the person belongs to
is_customer Boolean Contact is classified as a Customer
is_supplier Boolean Contact is classified as a Supplier
is_lead Boolean Contact is classified as a Lead
is_organization Boolean Contact is an organization
is_person Boolean Contact is a Person (individual)
contact_channel Contact Channel Channels to join the contact
address_work Address Contact work address
address_home Address Contact home address
email Email Contact email addresses
website Website Contact websites
phone_work Phone Contact work phone and fax numbers
phone_home Phone Contact home phone and fax numbers
lead_status String Lead status as defined in the CRM application
lead_source String Lead origin as defined in the CRM application
lead_referent_type Enum Entity type of the lead’s referent [Person,Organization]
lead_referent_id Reference Lead’s referent, can be a Person or an Organization
assignee_type Enum Entity type of the lead’s assignee [AppUser, Team]
assignee_id Reference Lead’s assignee can be an AppUser or a Team
lead_status_changes Array History track of the lead statuses
notes Array Notes about the person
Contacts LeadStatusChanges attributes
Field Type Description
status String Lead satus
created_at Date Time Date of the lead status change
Contacts Notes attributes
Field Type Description
id String Note id
description String Note content
tag String Note tag
value String Note value

Contacts List

GET https://api-connec.maestrano.com/api/v2/:group_id/contacts
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "contacts": [
    {
      "id": "e32303c1-5102-0132-661e-600308937d74",
      "group_id": "cld-4d7f86",
      "created_at": "2014-11-18T03:42:45Z",
      "updated_at": "2014-11-18T03:42:45Z",
      "name": "DoeCorp Inc.",
      "reference": "77456",
      "code": "OR2",
      "industry": "Banking",
      "annual_revenue": 1000000,
      "capital": 150000,
      "number_of_employees": 12,
      "is_customer": true,
      "is_supplier": true,
      "is_lead": false,
      "is_organization": true,
      "is_person": false,
      "contact_channel": {
        "skype": "doecorp"
      },
      "address_work": {
        "billing": {
          "line1": "62 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2062",
          "country": "AU"
        },
        "billing2": {
          "line1": "63 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2063",
          "country": "AU"
        },
        "shipping": {
          "line1": "64 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2064",
          "country": "AU"
        },
        "shipping2": {
          "line1": "65 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2065",
          "country": "AU"
        }
      },
      "email": {
        "address": "contact@doecorp.com",
        "address2": "info@doecorp.com"
      },
      "website": {
        "url": "http://www.doecorp.com",
        "url2": "http://www.doecorp.com/contactus"
      },
      "phone_work": {
        "landline": "+61 2 8574 1216",
        "landline2": "+1 2 8574 1216",
        "mobile": "+61 449 785 116",
        "mobile2": "+1 449 785 116",
        "fax": "+61 2 9974 1216",
        "fax2": "+1 2 9974 1216",
        "pager": "+61 440 785 116",
        "pager2": "+1 440 785 116"
      }
    }
  ]
}

Get Contacts
GET/api/v2/:group_id/contacts

Get the list of contacts.


POST https://api-connec.maestrano.com/api/v2/:group_id/contacts
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "contacts": {
    "name": "Doe Corp Inc.",
    "is_customer": true
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "contacts": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "name": "Doe Corp Inc.",
    "is_customer": true
  }
}

Create New Contact
POST/api/v2/:group_id/contacts

Create a new organization.


Contact

GET https://api-connec.maestrano.com/api/v2/:group_id/contacts/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "contacts": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-11-18T03:42:45Z",
    "updated_at": "2014-11-18T05:42:45Z",
    "name": "DoeCorp Inc.",
    "industry": "Banking",
    "annual_revenue": 800,
    "capital": 8000,
    "number_of_employees": 80,
    "is_customer": true,
    "is_supplier": true,
    "is_lead": true,
    "address_work": {
      "billing": {
        "line1": "62 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2062",
        "country": "AU"
      },
      "billing2": {
        "line1": "63 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2063",
        "country": "AU"
      },
      "shipping": {
        "line1": "64 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2064",
        "country": "AU"
      },
      "shipping2": {
        "line1": "65 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2065",
        "country": "AU"
      }
    },
    "email": {
      "address": "john13@maestrano.com",
      "address2": "jack13@example.com"
    },
    "website": {
      "url": "www.website13.com",
      "url2": "www.mywebsite13.com"
    },
    "phone_work": {
      "landline": "+61 2 8574 1216",
      "landline2": "+1 2 8574 1216",
      "mobile": "+61 449 785 116",
      "mobile2": "+1 449 785 116",
      "fax": "+61 2 9974 1216",
      "fax2": "+1 2 9974 1216",
      "pager": "+61 440 785 116",
      "pager2": "+1 440 785 116"
    }
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Contact
GET/api/v2/:group_id/contacts/{id}

Get a single organization.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The organization ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/contacts/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "contacts": {
    "name": "DoeCorp Inc.",
    "is_supplier": true
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "contacts": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-11-18T03:42:45Z",
    "updated_at": "2014-11-18T05:42:45Z",
    "name": "DoeCorp Inc.",
    "industry": "Banking",
    "annual_revenue": 800,
    "capital": 8000,
    "number_of_employees": 80,
    "is_customer": true,
    "is_supplier": true,
    "is_lead": true,
    "address_work": {
      "billing": {
        "line1": "62 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2062",
        "country": "AU"
      },
      "billing2": {
        "line1": "63 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2063",
        "country": "AU"
      },
      "shipping": {
        "line1": "64 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2064",
        "country": "AU"
      },
      "shipping2": {
        "line1": "65 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2065",
        "country": "AU"
      }
    },
    "email": {
      "address": "john13@maestrano.com",
      "address2": "jack13@example.com"
    },
    "website": {
      "url": "www.website13.com",
      "url2": "www.mywebsite13.com"
    },
    "phone_work": {
      "landline": "+61 2 8574 1216",
      "landline2": "+1 2 8574 1216",
      "mobile": "+61 449 785 116",
      "mobile2": "+1 449 785 116",
      "fax": "+61 2 9974 1216",
      "fax2": "+1 2 9974 1216",
      "pager": "+61 440 785 116",
      "pager2": "+1 440 785 116"
    }
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Contact
PUT/api/v2/:group_id/contacts/{id}

Update a single Contact

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The organization ID


Credit Notes

A CreditNote is a transaction representing a refund or credit of payment for goods or services that have been sold or purchased.

Business Rules

  • If a tax_code_id is specified for a CreditNote line, the associated tax rate is used to calculate the total_price of the line:

    • CUSTOMER CreditNote, the tax_code sale_tax_rate is used
    • SUPPLIER CreditNote, the tax_code purchase_tax_rate is used
  • If a refund of credit has been made on the CreditNote, it must be specified using the linked_transactions

  • If the remaining_credit of a CreditNote is equal to 0.0, its status is set to APPLIED

Credit Notes JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/credit_notes
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "invoices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "CreditNote UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "title": {
            "description": "CreditNote friendly name",
            "type": "string"
          },
          "transaction_number": {
            "description": "Reference number of the CreditNote",
            "type": "string"
          },
          "transaction_date": {
            "description": "CreditNote creation date, defaults to today if not specified",
            "type": "date-time"
          },
          "due_date": {
            "description": "CreditNote due date, defaults to today if not specified",
            "type": "date-time"
          },
          "payment_term": {
            "description": "Payment term",
            "enum": [
              "IMMEDIATE",
              "PIA",
              "NET7",
              "NET10",
              "NET30",
              "NET60",
              "NET90",
              "EOM"
            ]
          },
          "status": {
            "description": "CreditNote status",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "AUTHORISED",
              "PAID",
              "VOIDED",
              "INACTIVE"
            ],
            "default": "DRAFT"
          },
          "type": {
            "description": "CreditNote type indicates if it is based on a sale invoice or a purchase invoice",
            "enum": [
              "CUSTOMER",
              "SUPPLIER"
            ],
            "default": "CUSTOMER"
          },
          "balance": {
            "description": "Amount left to be applied",
            "type": "number"
          },
          "deposit": {
            "description": "Amount applied to date",
            "type": "number"
          },
          "remaining_credit": {
            "description": "Remaining credit to date",
            "type": "number"
          },
          "discount_percent": {
            "description": "Total discount percentage deducted on the invoice total",
            "type": "number"
          },
          "discount_amount": {
            "description": "Fixed discount amount deducted on the invoice total",
            "type": "number"
          },
          "organization_id": {
            "description": "Reference of the customer or supplier Organization",
            "type": "string"
          },
          "person_id": {
            "description": "Reference of the customer or supplier Person",
            "type": "string"
          },
          "warehouse_id": {
            "description": "Reference of the Warehouse to use for inventory management",
            "type": "string"
          },
          "tax_code_id": {
            "description": "Reference of the applicable Tax Code",
            "type": "string"
          },
          "freight_tax_code_id": {
            "description": "Reference of the applicable shipping Tax Code",
            "type": "string"
          },
          "account_id": {
            "description": "Reference of the Account used for the CreditNote",
            "type": "string"
          },
          "tax_calculation": {
            "description": "Tax calculation method for display purpose",
            "enum": [
              "TAX_EXCLUDED",
              "TAX_INCLUSIVE",
              "NOT_APPLICABLE"
            ]
          },
          "invoice_id": {
            "description": "Reference of parent Invoice",
            "type": "string"
          },
          "public_note": {
            "description": "Note visible to the customer on the invoice",
            "type": "string"
          },
          "private_note": {
            "description": "Internal note not visible to the customer",
            "type": "string"
          },
          "amount": {
            "$ref": "#/definitions/price",
            "readOnly": true
          },
          "billing_address": {
            "$ref": "#/definitions/address"
          },
          "shipping_address": {
            "$ref": "#/definitions/address"
          },
          "lines": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "Transaction line ID",
                    "type": "string"
                  },
                  "line_number": {
                    "description": "Transaction line number used for ordering",
                    "type": "integer"
                  },
                  "description": {
                    "description": "Transaction line description",
                    "type": "string"
                  },
                  "status": {
                    "description": "Transaction line status",
                    "enum": [
                      "ACTIVE",
                      "INACTIVE"
                    ],
                    "default": "ACTIVE"
                  },
                  "quantity": {
                    "description": "Quantity of Items",
                    "type": "number"
                  },
                  "reduction_percent": {
                    "description": "Reduction percentage applicable",
                    "type": "number"
                  },
                  "unit_price": {
                    "$ref": "#/definitions/price"
                  },
                  "total_price": {
                    "$ref": "#/definitions/price",
                    "readOnly": true
                  },
                  "service_date": {
                    "description": "Delivery date of the item/service",
                    "type": "string",
                    "format": "date-time"
                  },
                  "tax_code_id": {
                    "description": "Reference to the Tax Code applicable on the transaction line",
                    "type": "string"
                  },
                  "item_id": {
                    "description": "Reference to the Item of the transaction line",
                    "type": "string"
                  },
                  "account_id": {
                    "description": "Reference to the Account of the transaction line",
                    "type": "string"
                  },
                  "organization_id": {
                    "description": "Reference of the Customer or Supplier applicable to the transaction line",
                    "type": "string"
                  },
                  "payment_method_id": {
                    "description": "Reference to the Payment Method of the transaction line",
                    "type": "string"
                  },
                  "linked_transactions": {
                    "type": "array",
                    "items": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "description": "LinkedTransaction line ID",
                            "type": "string"
                          },
                          "applied_amount": {
                            "description": "Amount applied on the linked transaction",
                            "type": "number"
                          },
                          "transactionable_id": {
                            "description": "Reference to the Transaction UUID",
                            "type": "string"
                          },
                          "transactionable_type": {
                            "description": "Reference to the Transaction type (Invoice, Payment, CreditNote, etc...)",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/credit_notes

Attributes

Field Type Description
id String CreditNote UUID
group_id String Group ID
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Unique code, auto-generated if not specified
title String CreditNote friendly name
transaction_number String Reference number of the CreditNote
transaction_date Date Time CreditNote creation date, defaults to today if not specified
due_date Date Time CreditNote due date, defaults to today if not specified
payment_term Payment term
status CreditNote status
type CreditNote type indicates if it is based on a sale invoice or a purchase invoice
balance Number Amount left to be applied
deposit Number Amount applied to date
remaining_credit Number Remaining credit to date
discount_percent Number Total discount percentage deducted on the invoice total
discount_amount Number Fixed discount amount deducted on the invoice total
organization_id String Reference of the customer or supplier Organization
person_id String Reference of the customer or supplier Person
warehouse_id String Reference of the Warehouse to use for inventory management
tax_code_id String Reference of the applicable Tax Code
freight_tax_code_id String Reference of the applicable shipping Tax Code
account_id String Reference of the Account used for the CreditNote
tax_calculation Tax calculation method for display purpose
invoice_id String Reference of parent Invoice
public_note String Note visible to the customer on the invoice
private_note String Internal note not visible to the customer
amount Price
billing_address Address
shipping_address Address
lines Array
CreditNotes Lines attributes
Field Type Description
id String Transaction line ID
line_number Integer Transaction line number used for ordering
description String Transaction line description
status Transaction line status
quantity Number Quantity of Items
reduction_percent Number Reduction percentage applicable
unit_price Price
total_price Price
service_date Date Time Delivery date of the item/service
tax_code_id String Reference to the Tax Code applicable on the transaction line
item_id String Reference to the Item of the transaction line
account_id String Reference to the Account of the transaction line
organization_id String Reference of the Customer or Supplier applicable to the transaction line
payment_method_id String Reference to the Payment Method of the transaction line
linked_transactions Array
CreditNotes LinkedTransactions attributes
Field Type Description
id String LinkedTransaction line ID
applied_amount Number Amount applied on the linked transaction
transactionable_id String Reference to the Transaction UUID
transactionable_type String Reference to the Transaction type (Invoice, Payment, CreditNote, etc…)

CreditNotes List

GET https://api-connec.maestrano.com/api/v2/:group_id/credit_notes
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "credit_notes": [
    {
      "id": "b3f169f0-5a96-0132-30de-600308937d74",
      "group_id": "cld-fd45gf12",
      "created_at": "2014-11-30T08:13:34Z",
      "updated_at": "2014-11-30T08:13:34Z",
      "code": "171",
      "title": "Stationery supplies for 2015",
      "transaction_number": "SUP2015",
      "transaction_date": "2015-01-12T00:00:00Z",
      "due_date": "2015-01-31T00:00:00Z",
      "status": "UNAPPLIED",
      "type": "CUSTOMER",
      "balance": 22,
      "deposit": 11,
      "remaining_credit": 22,
      "discount_percent": 0,
      "discount_amount": 0,
      "public_note": "Enjoy!",
      "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
      "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
      "currency_rate": 0.8794,
      "amount": {
        "total_amount": 33,
        "net_amount": 30,
        "tax_amount": 3,
        "tax_rate": 10,
        "currency": "USD"
      },
      "billing_address": {
        "line1": "210 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2000",
        "country": "AU"
      },
      "shipping_address": {
        "line1": "210 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2000",
        "country": "AU"
      },
      "invoice_id": "b3f169f0-5a96-0132-30de-600308937d74",
      "linked_transactions": [
        {
          "applied_amount": 11,
          "id": "a4e27ae1-6b87-0123-29ed-700419848e75",
          "class": "Invoice"
        }
      ],
      "lines": [
        {
          "id": "54b323b30202cbd6da000be5",
          "line_number": 1,
          "description": "2015 notebook",
          "status": "ACTIVE",
          "quantity": 10,
          "unit_price": {
            "total_amount": 1.1,
            "net_amount": 1,
            "tax_amount": 0.1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "total_price": {
            "total_amount": 11,
            "net_amount": 10,
            "tax_amount": 1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
          "item_id": "b3d52f61-5a96-0132-30ce-600308937d74",
          "account_id": "t4d6dd11-5a96-0132-30cf-600308937d21"
        },
        {
          "id": "54b323b70202cbd6da000dbb",
          "line_number": 2,
          "description": "2015 calendar A3 format",
          "status": "ACTIVE",
          "quantity": 2,
          "unit_price": {
            "total_amount": 11,
            "net_amount": 10,
            "tax_amount": 1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "total_price": {
            "total_amount": 22,
            "net_amount": 20,
            "tax_amount": 2,
            "tax_rate": 10,
            "currency": "USD"
          },
          "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
          "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74",
          "account_id": "t4d6dd11-5a96-0132-30cf-600308937d21"
        }
      ]
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",

  "type": "object",
  "properties": {
    "credit_notes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "CreditNote UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "title": {
            "description": "CreditNote friendly name",
            "type": "string"
          },
          "transaction_number": {
            "description": "Reference number of the CreditNote",
            "type": "string"
          },
          "transaction_date": {
            "description": "CreditNote creation date, defaults to today if not specified",
            "type": "date-time"
          },
          "due_date": {
            "description": "CreditNote due date, defaults to today if not specified",
            "type": "date-time"
          },
          "payment_term": {
            "description": "Payment term",
            "enum": ["IMMEDIATE", "PIA", "NET7", "NET10", "NET30", "NET60", "NET90", "EOM"]
          },
          "status": {
            "description": "CreditNote status",
            "enum": ["DRAFT", "APPLIED", "UNAPPLIED"],
            "default": "DRAFT"
          },
          "type": {
            "description": "CreditNote type indicates if it is a customer CreditNote or a supplier CreditNote",
            "enum": ["CUSTOMER", "SUPPLIER"],
            "default": "CUSTOMER"
          },
          "balance": {
            "description": "Amount left on the CreditNote",
            "type": "number",
            "readOnly": true
          },
          "deposit": {
            "description": "Amount refund to date",
            "type": "number",
            "readOnly": true
          },
          "remaining_credit": {
            "description": "Credit amount still avaible",
            "type": "number",
            "readOnly": true
          },
          "discount_percent": {
            "description": "Total discount percentage deducted on the CreditNote total",
            "type": "number"
          },
          "discount_amount": {
            "description": "Fixed discount amount deducted on the CreditNote total",
            "type": "number"
          },
          "organization_id": {
            "description": "Reference of the customer or supplier Organization",
            "type": "string"
          },
          "person_id": {
            "description": "Reference of the customer or supplier Person",
            "type": "string"
          },
          "tax_code_id": {
            "description": "Reference of the applicable Tax Code",
            "type": "string"
          },
          "freight_tax_code_id": {
            "description": "Reference of the applicable shipping Tax Code",
            "type": "string"
          },
          "account_id": {
            "description": "Reference of the Account used for the CreditNote",
            "type": "string"
          },
          "tax_calculation": {
            "description": "Tax calculation method for display purpose",
            "enum": ["TAX_EXCLUDED", "TAX_INCLUSIVE", "NOT_APPLICABLE"]
          },
          "sales_order_id": {
            "description": "Reference of parent Sales Order",
            "type": "string"
          },
          "public_note": {
            "description": "Note visible to the customer on the CreditNote",
            "type": "string"
          },
          "private_note": {
            "description": "Internal note not visible to the customer",
            "type": "string"
          },
          "currency_rate": {
            "description": "Rate for the currency pair at the date of the transaction.",
            "type": "number"
          },
          "amount": {
            "$ref": "#/definitions/price",
            "readOnly": true
          },
          "billing_address": {
            "$ref": "#/definitions/address"
          },
          "shipping_address": {
            "$ref": "#/definitions/address"
          },
          "linked_transactions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "applied_amount": {
                  "description": "Transaction reference ID",
                  "type": "string"
                },
                "id": {
                  "description": "Transaction reference ID",
                  "type": "string"
                },
                "class": {
                  "description": "Transaction reference type",
                  "type": "string",
                  "enum": ["Invoice", "SalesOrder", "PurchaseOrder", "Quote", Payment]
                }
              }
          },
          "lines": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "CreditNote line ID",
                    "type": "string"
                  },
                  "line_number": {
                    "description": "CreditNote line number used for ordering",
                    "type": "integer"
                  },
                  "status": {
                    "description": "CreditNote line status",
                    "enum": ["ACTIVE", "INACTIVE"],
                    "default": "ACTIVE"
                  },
                  "quantity": {
                    "description": "Quantity of Items",
                    "type": "number"
                  },
                  "reduction_percent": {
                    "description": "Reduction percentage applicable",
                    "type": "number"
                  },
                  "unit_price": {
                    "$ref": "#/definitions/price"
                  },
                  "total_price": {
                    "$ref": "#/definitions/price",
                    "readOnly": true
                  },
                  "service_date": {
                    "description": "Delivery date of the item/service",
                    "type": "string",
                    "format": "date-time"
                  },
                  "tax_code_id": {
                    "description": "Reference to the Tax Code applicable on the CreditNote line",
                    "type": "string"
                  },
                  "item_id": {
                    "description": "Reference to the Item of the CreditNote line",
                    "type": "string"
                  },
                  "account_id": {
                    "description": "Reference to the Account of the CreditNote line",
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Get CreditNotes
GET/api/v2/:group_id/credit_notes

Get the list of CreditNotes.

Attributes

Field Type Description
id String Credit note UUID
group_id String Group ID
created_at Date-time Credit note creation date
updated_at Date-time Credit note last update date
code String Code, auto-generated if not specified
status Enum [DRAFT, UNAPPLIED, APPLIED, VOIDED, INACTIVE] - Default: DRAFT
title String Credit note title
transaction_number String Credit note number
transaction_date Date-time Credit note date
due_date Date-time Credit note due date
payment_term Enum [IMMEDIATE, PIA, NET7, NET10, NET30, NET60, NET90, EOM]
type Enum [CUSTOMER (owing a customer), SUPPLIER (debt from a supplier)] - Default: CUSTOMER
balance Number Credit note balance, calculated with remaining_credit
deposit Number Credit note deposit, calculated with the total applied amounts of linked_transactions
remaining_credit Number Credit note remaining credit, calculated with amount and the total applied amounts of linked_transactions
discount_percent Number Total discount percentage deducted on the credit note total
discount_amount Number Total discount amount deducted on the credit note total
currency_rate Number Rate for the currency pair at the date of the transaction
public_note String Note visible by the customer on the credit note
private_note String Internal note not visible by the customer
tax_calculation Enum [TAX_EXCLUDED, TAX_INCLUSIVE, NOT_APPLICABLE] (display purpose only)
tax_code_id Reference Tax code applied to the credit note
freight_tax_code_id Reference Shipping tax code applied to the credit_note
organization_id Reference The credit_note customer/supplier organization
person_id Reference The credit_note customer/supplier contact
account_id Reference Account used for the credit_note
invoice_id Reference Invoice the credit note has been created from
amount Price Credit note total amount, calculated with the credit_note lines
billing_address Address Credit note billing address
shipping_address Address Credit note shipping address
linked_transactions Array Transactions covered by the credit note
lines Array Credit note detail
Credit note linked transactions attributes
Field Type Description
applied_amount Number Amount of the credit note applied on the transaction
id String UUID of the transaction
class Enum Transaction type: [Quote, Invoice, SalesOrder, PurchaseOrder, Payment]
Credit note lines attributes
Field Type Description
id String Line id
status Enum ACTIVE, INACTIVE] - Default: ACTIVE
line_number String Line number
description String Line description
reduction_percent Number Reduction percentage applicable
service_date Date-time Delivery date of the item/service
quantity Number Item quantity
unit_price Price Item unit price
total_price Price Line total price, calculated with unit_price and quantity
tax_code_id Reference Tax code applied to this line
account_id Reference Account used for this line
item_id Reference Item concerned by this line

POST https://api-connec.maestrano.com/api/v2/:group_id/credit_notes
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "credit_notes": {
        "due_date": "2014-12-05T08:13:31Z",
        "title": "Team meeting catering 12-01-2015",
        "status": "APPLIED",
        "type": "SUPPLIER",
        "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
        "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
        "linked_transactions": [
          {
            "applied_amount": 125.4,
            "id": "a4e27ae1-6b87-0123-29ed-700419848e75",
            "class": "Invoice"
          }
        ],
        "lines: [
            {
                "id: "54b323b30202cbd6da000be5",
                "line_number": 1,
                "description: "Medium size pizza",
                "quantity: 6,
                "unit_price: {
                    "total_amount: 16.5,
                    "net_amount: 15.0,
                    "tax_amount: 1.5,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799",
                "item_id: "ddc285c1-5a96-0132-31b8-600308937d74"
            },
            {
                "id: "54b323b70202cbd6da000dbb",
                "line_number": 2,
                "description: "Mixed salad",
                "quantity: 2,
                "unit_price: {
                    "total_amount: 13.2,
                    "net_amount: 12.0,
                    "tax_amount: 1.2,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799"
            }
        ]
    }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
    "credit_notes": {
        "id": "e32303c1-5102-0132-661e-600308937d74",
        "group_id": "cld-4d7f86",
        "created_at": "2014-12-18T03:42:45Z",
        "updated_at": "2014-12-18T03:42:45Z",
        "due_date": "2014-12-05T08:13:31Z",
        "status": "DRAFT",
        "type": "SUPPLIER",
        "balance": 0.0,
        "deposit": 125.4,
        "remaining_credit": 0.0,
        "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
        "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
        "currency_rate": 0.8794,
        "amount": {
            "total_amount": 125.4,
            "net_amount": 113.0,
            "tax_amount": 11.4,
            "tax_rate": 10.0,
            "currency": "USD"
        },
        "linked_transactions": [
          {
            "applied_amount": 125.4,
            "id": "a4e27ae1-6b87-0123-29ed-700419848e75",
            "class": "Invoice"
          }
        ],
        "lines: [
            {
                "id: "line1",
                "line_number": 1,
                "description: "Medium size pizza",
                "quantity: 6,
                "unit_price: {
                    "total_amount: 16.5,
                    "net_amount: 15.0,
                    "tax_amount: 1.5,
                    "tax_rate: 10.0
                },
                "total_price: {
                    "total_amount: 99.0,
                    "net_amount: 90.0,
                    "tax_amount: 9.0,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799",
                "item_id: "ddc285c1-5a96-0132-31b8-600308937d74"
            },
            {
                "id: "line2",
                "line_number": 2,
                "description: "Mixed salad",
                "quantity: 2,
                "unit_price: {
                    "total_amount: 13.2,
                    "net_amount: 12.0,
                    "tax_amount: 1.2,
                    "tax_rate: 10.0
                },
                "total_price: {
                    "total_amount: 26.4,
                    "net_amount: 24.0,
                    "tax_amount: 2.4,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799"
            }
        ]
    }
}

Create New CreditNote
POST/api/v2/:group_id/credit_notes

Create a new CreditNote.


CreditNote

GET https://api-connec.maestrano.com/api/v2/:group_id/credit_notes/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "credit_notes": {
    "id": "b3f169f0-5a96-0132-30de-600308937d74",
    "group_id": "cld-fd45gf12",
    "created_at": "2014-11-30T08:13:34Z",
    "updated_at": "2014-11-30T08:13:34Z",
    "transaction_number": "txn_00005",
    "transaction_date": "2014-11-30T08:13:31Z",
    "due_date": "2014-12-05T08:13:31Z",
    "status": "DRAFT",
    "type": "CUSTOMER",
    "balance": 33,
    "deposit": 0,
    "remaining_credit": 33,
    "discount_percent": 0,
    "discount_amount": 0,
    "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
    "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
    "currency_rate": 0.8794,
    "amount": {
      "total_amount": 33,
      "net_amount": 30,
      "tax_amount": 3,
      "tax_rate": 10,
      "currency": "USD"
    },
    "billing_address": {
      "line1": "62 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2062",
      "country": "AU"
    },
    "shipping_address": {
      "line1": "64 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2064",
      "country": "AU"
    },
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 1,
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 10,
          "net_amount": 9,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      },
      {
        "id": "54b323b70202cbd6da000dbb",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 2,
        "status": "ACTIVE",
        "quantity": 2,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 22,
          "net_amount": 20,
          "tax_amount": 2,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get CreditNote
GET/api/v2/:group_id/credit_notes/{id}

Get a single CreditNote.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The CreditNote ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/credit_notes/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "credit_notes": {
        "due_date": "2015-31-01T00:00:00Z",
        "status": "AUTHORIZED",
        "lines: [
            {
                "id": "54b323b30202cbd6da000be5",
                "quantity": 6
            }
        }
    }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "credit_notes": {
    "id": "b3f169f0-5a96-0132-30de-600308937d74",
    "group_id": "cld-fd45gf12",
    "created_at": "2014-11-30T08:13:34Z",
    "updated_at": "2014-11-30T08:13:34Z",
    "transaction_number": "txn_00005",
    "transaction_date": "2014-11-30T08:13:31Z",
    "due_date": "2014-12-05T08:13:31Z",
    "status": "DRAFT",
    "type": "CUSTOMER",
    "balance": 33,
    "deposit": 0,
    "remaining_credit": 33,
    "discount_percent": 0,
    "discount_amount": 0,
    "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
    "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
    "currency_rate": 0.8794,
    "amount": {
      "total_amount": 33,
      "net_amount": 30,
      "tax_amount": 3,
      "tax_rate": 10,
      "currency": "USD"
    },
    "billing_address": {
      "line1": "62 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2062",
      "country": "AU"
    },
    "shipping_address": {
      "line1": "64 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2064",
      "country": "AU"
    },
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 1,
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 10,
          "net_amount": 9,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      },
      {
        "id": "54b323b70202cbd6da000dbb",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 2,
        "status": "ACTIVE",
        "quantity": 2,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 22,
          "net_amount": 20,
          "tax_amount": 2,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a CreditNote
PUT/api/v2/:group_id/credit_notes/{id}

Update a single CreditNote. For a CreditNote line to be deleted, the status of the CreditNote line must be set to “INACTIVE”

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The CreditNote ID


Credit Payments

Credit Payments JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/credit_payments
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "credit_payments": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Credit payment UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[DRAFT, SUBMITTED, AUTHORISED, INACTIVE, APPLIED, UNAPPLIED] - Default: DRAFT",
            "type": "string",
            "format": "enum"
          },
          "type": {
            "description": "[CUSTOMER, SUPPLIER] - Default: CUSTOMER",
            "type": "string",
            "format": "enum"
          },
          "title": {
            "description": "Credit payment title",
            "type": "string"
          },
          "transaction_date": {
            "description": "Transaction date",
            "type": "string",
            "format": "date-time"
          },
          "transaction_number": {
            "description": "Transaction reference",
            "type": "string"
          },
          "public_note": {
            "description": "Note visible on the document",
            "type": "string"
          },
          "private_note": {
            "description": "Private internal note",
            "type": "string"
          },
          "organization_id": {
            "description": "#Organization that made the credit payment",
            "type": "string",
            "format": "reference"
          },
          "person_id": {
            "description": "#Person that made the credit payment",
            "type": "string",
            "format": "reference"
          },
          "account_id": {
            "description": "#Account the credit payment was made on",
            "type": "string",
            "format": "reference"
          },
          "payment_method_id": {
            "description": "#PaymentMethod used for the credit payment",
            "type": "string",
            "format": "reference"
          },
          "amount": {
            "description": "Credit payment total amount, calculated with the lines",
            "$ref": "#/definitions/price",
            "readOnly": true
          },
          "unapplied_amount": {
            "description": "Credit payment total unapplied amount",
            "type": "number"
          },
          "process_payment": {
            "description": "Is the credit payment processed",
            "type": "boolean"
          },
          "linked_transactions": {
            "description": "Credit payment linked transactions",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "applied_amount": {
                  "description": "Linked transaction applied amount",
                  "type": "number"
                },
                "class": {
                  "description": "Linked transaction class: [Invoice, Payment, ...]",
                  "type": "string",
                  "format": "enum"
                },
                "id": {
                  "description": "Linked transaction UUID",
                  "type": "string"
                }
              }
            }
          },
          "lines": {
            "description": "Transaction details",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "required": [
                "quantity",
                "unit_price"
              ],
              "properties": {
                "id": {
                  "description": "Line id",
                  "type": "string"
                },
                "status": {
                  "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
                  "type": "string",
                  "format": "enum"
                },
                "line_number": {
                  "description": "Line number",
                  "type": "number"
                },
                "description": {
                  "description": "Line description",
                  "type": "string"
                },
                "quantity": {
                  "description": "Line quantity",
                  "type": "number"
                },
                "unit_price": {
                  "description": "Line unit price",
                  "$ref": "#/definitions/price"
                },
                "total_price": {
                  "description": "Line total price, calculated using unit_price and quantity",
                  "$ref": "#/definitions/price",
                  "readOnly": true
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/credit_payments

Attributes

Field Type Description
resource_type String Resource type name
id String Credit payment UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [DRAFT, SUBMITTED, AUTHORISED, INACTIVE, APPLIED, UNAPPLIED] - Default: DRAFT
type Enum [CUSTOMER, SUPPLIER] - Default: CUSTOMER
title String Credit payment title
transaction_date Date Time Transaction date
transaction_number String Transaction reference
public_note String Note visible on the document
private_note String Private internal note
organization_id Reference Organization that made the credit payment
person_id Reference Person that made the credit payment
account_id Reference Account the credit payment was made on
payment_method_id Reference PaymentMethod used for the credit payment
amount Price Credit payment total amount, calculated with the lines
unapplied_amount Number Credit payment total unapplied amount
process_payment Boolean Is the credit payment processed
linked_transactions Array Credit payment linked transactions
lines Array Transaction details
CreditPayments LinkedTransactions attributes
Field Type Description
applied_amount Number Linked transaction applied amount
class Enum Linked transaction class: [Invoice, Payment, …]
id String Linked transaction UUID
CreditPayments Lines attributes
Field Type Description
id String Line id
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
line_number Number Line number
description String Line description
quantity Number Line quantity
unit_price Price Line unit price
total_price Price Line total price, calculated using unit_price and quantity

Credit Payments List

GET https://api-connec.maestrano.com/api/v2/:group_id/credit_payments
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "credit_payments": [
    {
      "id": "815743a0-1915-0134-bd38-745c899ef027",
      "code": "DE3",
      "transaction_number": "112",
      "title": "Credit payment",
      "amount": {
        "total_amount": 12,
        "net_amount": 12,
        "currency": "USD"
      },
      "unapplied_amount": 0,
      "transaction_date": "2015-10-01T23:00:00Z",
      "status": "DRAFT",
      "private_note": "private note",
      "public_note": "public note",
      "organization_id": "3f58c721-5102-0132-6600-600308937d74",
      "person_id": "1258c721-5102-0132-6600-600308937d71",
      "account_id": "f258c721-5102-0132-6600-600308937d04",
      "lines": [
        {
          "id": "12",
          "line_number": 0,
          "description": "...",
          "status": "ACTIVE",
          "quantity": 1,
          "unit_price": {
            "net_amount": 12
          },
          "total_price": {
            "net_amount": 12
          }
        }
      ],
      "linked_transactions": [
        {
          "applied_amount": 12,
          "class": "Invoice",
          "id": "q258c721-5102-0132-6600-600308937d01"
        }
      ],
      "created_at": "2016-06-20T13:04:54Z",
      "updated_at": "2016-06-20T13:04:54Z",
      "group_id": "org-fbba",
      "channel_id": "org-fbba",
      "resource_type": "credit_payments"
    }
  ]
}

Get Credit Payments
GET/api/v2/:group_id/credit_payments

Get the list of credPt payments.


POST https://api-connec.maestrano.com/api/v2/:group_id/credit_payments
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "credit_payments": {
    "title": "Credit payment"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "credit_payments": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "title": "Credit payment"
  }
}

Create New Credit payment
POST/api/v2/:group_id/credit_payments

Create a new credit payment.


Credit payment

GET https://api-connec.maestrano.com/api/v2/:group_id/credit_payments/815743a0-1915-0134-bd38-745c899ef027
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "credit_payments": {
    "id": "815743a0-1915-0134-bd38-745c899ef027",
    "code": "DE3",
    "transaction_number": "112",
    "title": "Credit payment",
    "amount": {
      "net_amount": 12
    },
    "transaction_date": "2015-10-01T23:00:00Z",
    "status": "DRAFT",
    "private_note": "private note",
    "public_note": "public note",
    "organization_id": "3f58c721-5102-0132-6600-600308937d74",
    "person_id": "1258c721-5102-0132-6600-600308937d71",
    "account_id": "f258c721-5102-0132-6600-600308937d04",
    "lines": [
      {
        "id": "12",
        "line_number": 0,
        "description": "...",
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "net_amount": 12
        },
        "total_price": {
          "net_amount": 12
        }
      }
    ],
    "linked_transactions": [
      {
        "applied_amount": 12,
        "class": "Invoice",
        "id": "q258c721-5102-0132-6600-600308937d01"
      }
    ],
    "created_at": "2016-06-20T13:04:54Z",
    "updated_at": "2016-06-20T13:04:54Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "credit_payments"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Credit payment
GET/api/v2/:group_id/credit_payments/{id}

Get a single credit payment.

URI Parameters
HideShow
id
string (required) Example: 815743a0-1915-0134-bd38-745c899ef027

The credit payment ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/credit_payments/815743a0-1915-0134-bd38-745c899ef027
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "credit_payments": {
    "title": "Credit payment"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "credit_payments": {
    "id": "815743a0-1915-0134-bd38-745c899ef027",
    "code": "DE3",
    "transaction_number": "112",
    "title": "Credit payment",
    "amount": {
      "net_amount": 12
    },
    "transaction_date": "2015-10-01T23:00:00Z",
    "status": "DRAFT",
    "private_note": "private note",
    "public_note": "public note",
    "organization_id": "3f58c721-5102-0132-6600-600308937d74",
    "person_id": "1258c721-5102-0132-6600-600308937d71",
    "account_id": "f258c721-5102-0132-6600-600308937d04",
    "lines": [
      {
        "id": "12",
        "line_number": 0,
        "description": "...",
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "net_amount": 12
        },
        "total_price": {
          "net_amount": 12
        }
      }
    ],
    "linked_transactions": [
      {
        "applied_amount": 12,
        "class": "Invoice",
        "id": "q258c721-5102-0132-6600-600308937d01"
      }
    ],
    "created_at": "2016-06-20T13:04:54Z",
    "updated_at": "2016-06-20T13:04:54Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "credit_payments"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a Credit payment
PUT/api/v2/:group_id/credit_payments/{id}

Update a single credit payment

URI Parameters
HideShow
id
string (required) Example: 815743a0-1915-0134-bd38-745c899ef027

The credit payment ID


Deposits

Deposits JSON schema

A deposit object is a transaction that records one or more deposits of fund to the specified account.

GET https://api-connec.maestrano.com/api/v2/json_schema/deposits
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "deposits": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Deposit UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[DRAFT, SUBMITTED, AUTHORISED, INACTIVE, APPLIED, UNAPPLIED] - Default: DRAFT",
            "type": "string",
            "format": "enum"
          },
          "title": {
            "description": "Deposit title",
            "type": "string"
          },
          "transaction_number": {
            "description": "Transaction reference",
            "type": "string"
          },
          "transaction_date": {
            "description": "Transaction date",
            "type": "string",
            "format": "date-time"
          },
          "public_note": {
            "description": "Note visible on the document",
            "type": "string"
          },
          "private_note": {
            "description": "Private internal note",
            "type": "string"
          },
          "organization_id": {
            "description": "#Organization that made the deposit",
            "type": "string",
            "format": "reference"
          },
          "person_id": {
            "description": "#Person that made the deposit",
            "type": "string",
            "format": "reference"
          },
          "account_id": {
            "description": "#Account the deposit was made on",
            "type": "string",
            "format": "reference"
          },
          "amount": {
            "description": "Deposit total amount, calculated with the lines",
            "$ref": "#/definitions/price",
            "readOnly": true
          },
          "lines": {
            "description": "Transaction details",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "required": [
                "quantity",
                "unit_price"
              ],
              "properties": {
                "id": {
                  "description": "Line id",
                  "type": "string"
                },
                "status": {
                  "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
                  "type": "string",
                  "format": "enum"
                },
                "line_number": {
                  "description": "Line number",
                  "type": "number"
                },
                "description": {
                  "description": "Line description",
                  "type": "string"
                },
                "quantity": {
                  "description": "Line quantity",
                  "type": "number"
                },
                "unit_price": {
                  "description": "Line unit price",
                  "$ref": "#/definitions/price"
                },
                "total_price": {
                  "description": "Line total price, calculated using unit_price and quantity",
                  "$ref": "#/definitions/price",
                  "readOnly": true
                }
              }
            }
          },
          "cash_back": {
            "type": "object",
            "properties": {
              "account_id": {
                "description": "Cash back #account",
                "type": "string",
                "format": "reference"
              },
              "amount": {
                "description": "Cash back amount",
                "type": "number"
              },
              "memo": {
                "description": "Cash back memo",
                "type": "string"
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/deposits

Attributes

Field Type Description
resource_type String Resource type name
id String Deposit UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [DRAFT, SUBMITTED, AUTHORISED, INACTIVE, APPLIED, UNAPPLIED] - Default: DRAFT
title String Deposit title
transaction_number String Transaction reference
transaction_date Date Time Transaction date
public_note String Note visible on the document
private_note String Private internal note
organization_id Reference Organization that made the deposit
person_id Reference Person that made the deposit
account_id Reference Account the deposit was made on
amount Price Deposit total amount, calculated with the lines
lines Array Transaction details
cash_back Object
Deposits Lines attributes
Field Type Description
id String Line id
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
line_number Number Line number
description String Line description
quantity Number Line quantity
unit_price Price Line unit price
total_price Price Line total price, calculated using unit_price and quantity
Deposits CashBack attributes
Field Type Description
account_id Reference Cash back account
amount Number Cash back amount
memo String Cash back memo

Deposits List

GET https://api-connec.maestrano.com/api/v2/:group_id/deposits
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "deposits": [
    {
      "id": "815743a0-1915-0134-bd38-745c899ef027",
      "code": "DE3",
      "transaction_number": "112",
      "title": "Deposit",
      "amount": {
        "net_amount": 12
      },
      "transaction_date": "2015-10-01T23:00:00Z",
      "status": "DRAFT",
      "private_note": "private note",
      "public_note": "public note",
      "organization_id": "3f58c721-5102-0132-6600-600308937d74",
      "person_id": "1258c721-5102-0132-6600-600308937d71",
      "account_id": "f258c721-5102-0132-6600-600308937d04",
      "lines": [
        {
          "id": "12",
          "line_number": 0,
          "description": "...",
          "status": "ACTIVE",
          "quantity": 1,
          "unit_price": {
            "net_amount": 12
          },
          "total_price": {
            "net_amount": 12
          }
        }
      ],
      "cash_back": {
        "account_id": "4r58c721-5102-0132-6600-600308937d23",
        "amount": 2,
        "memo": "..."
      },
      "created_at": "2016-06-20T13:04:54Z",
      "updated_at": "2016-06-20T13:04:54Z",
      "group_id": "org-fbba",
      "channel_id": "org-fbba",
      "resource_type": "deposits"
    }
  ]
}

Get Deposits
GET/api/v2/:group_id/deposits

Get the list of deposits.


POST https://api-connec.maestrano.com/api/v2/:group_id/deposits
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "deposits": {
    "title": "Deposit"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "deposits": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "title": "Deposit"
  }
}

Create New Deposit
POST/api/v2/:group_id/deposits

Create a new deposit.


Deposit

GET https://api-connec.maestrano.com/api/v2/:group_id/deposits/815743a0-1915-0134-bd38-745c899ef027
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "deposits": {
    "id": "815743a0-1915-0134-bd38-745c899ef027",
    "code": "DE3",
    "transaction_number": "112",
    "title": "Deposit",
    "amount": {
      "net_amount": 12
    },
    "transaction_date": "2015-10-01T23:00:00Z",
    "status": "DRAFT",
    "private_note": "private note",
    "public_note": "public note",
    "organization_id": "3f58c721-5102-0132-6600-600308937d74",
    "person_id": "1258c721-5102-0132-6600-600308937d71",
    "account_id": "f258c721-5102-0132-6600-600308937d04",
    "lines": [
      {
        "id": "12",
        "line_number": 0,
        "description": "...",
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "net_amount": 12
        },
        "total_price": {
          "net_amount": 12
        }
      }
    ],
    "cash_back": {
      "account_id": "4r58c721-5102-0132-6600-600308937d23",
      "amount": 2,
      "memo": "..."
    },
    "created_at": "2016-06-20T13:04:54Z",
    "updated_at": "2016-06-20T13:04:54Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "deposits"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Deposit
GET/api/v2/:group_id/deposits/{id}

Get a single deposit.

URI Parameters
HideShow
id
string (required) Example: 815743a0-1915-0134-bd38-745c899ef027

The deposit ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/deposits/815743a0-1915-0134-bd38-745c899ef027
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "deposits": {
    "title": "Deposit"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "deposits": {
    "id": "815743a0-1915-0134-bd38-745c899ef027",
    "code": "DE3",
    "transaction_number": "112",
    "title": "Deposit",
    "amount": {
      "net_amount": 12
    },
    "transaction_date": "2015-10-01T23:00:00Z",
    "status": "DRAFT",
    "private_note": "private note",
    "public_note": "public note",
    "organization_id": "3f58c721-5102-0132-6600-600308937d74",
    "person_id": "1258c721-5102-0132-6600-600308937d71",
    "account_id": "f258c721-5102-0132-6600-600308937d04",
    "lines": [
      {
        "id": "12",
        "line_number": 0,
        "description": "...",
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "net_amount": 12
        },
        "total_price": {
          "net_amount": 12
        }
      }
    ],
    "cash_back": {
      "account_id": "4r58c721-5102-0132-6600-600308937d23",
      "amount": 2,
      "memo": "..."
    },
    "created_at": "2016-06-20T13:04:54Z",
    "updated_at": "2016-06-20T13:04:54Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "deposits"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a Deposit
PUT/api/v2/:group_id/deposits/{id}

Update a single deposit

URI Parameters
HideShow
id
string (required) Example: 815743a0-1915-0134-bd38-745c899ef027

The deposit ID


Employees

An employee represents a person employed by your company.

Employees JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/employees
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "people": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Employee UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
            "type": "string",
            "format": "enum"
          },
          "title": {
            "description": "Employee title (Mr, Mrs, ...)",
            "type": "string"
          },
          "first_name": {
            "description": "Employee first name",
            "type": "string"
          },
          "last_name": {
            "description": "Employee last name",
            "type": "string"
          },
          "middle_name": {
            "description": "Employee middle name",
            "type": "string"
          },
          "full_name": {
            "description": "Employee full name",
            "type": "string"
          },
          "birth_date": {
            "description": "Employee date of birth",
            "type": "string",
            "format": "date-time"
          },
          "gender": {
            "description": "Gender, one of [MALE, FEMALE]",
            "type": "string",
            "format": "enum"
          },
          "mno_user_id": {
            "description": "Maestrano User ID to match a User created via SSO if applicable",
            "type": "string"
          },
          "social_security_number": {
            "description": "Employee Social Security Number",
            "type": "string"
          },
          "hired_date": {
            "description": "Employment start date",
            "type": "string",
            "format": "date-time"
          },
          "released_date": {
            "description": "Employment end date",
            "type": "string",
            "format": "date-time"
          },
          "job_status": {
            "description": "Job status (Current, Released, etc...)",
            "type": "string"
          },
          "bill_rate": {
            "description": "Employee default billing rate",
            "type": "number"
          },
          "location": {
            "description": "Employee location",
            "type": "string"
          },
          "supervisor": {
            "description": "Employee supervisor name",
            "type": "string"
          },
          "job_title": {
            "description": "Employee job title",
            "type": "string"
          },
          "note": {
            "description": "Employee private note",
            "type": "string"
          },
          "address": {
            "description": "Employee personal address",
            "$ref": "#/definitions/address"
          },
          "email": {
            "description": "Person email addresses",
            "$ref": "#/definitions/email"
          },
          "phone": {
            "description": "Person work phone and fax numbers",
            "$ref": "#/definitions/phone"
          },
          "bank_accounts": {
            "description": "Person bank accounts details",
            "type": "array",
            "items": {
              "$ref": "#/definitions/bank_account"
            }
          },
          "pay_schedule_id": {
            "description": "Employee Pay Schedule reference",
            "type": "string"
          },
          "employee_salaries": {
            "description": "Employee default salary breakdown",
            "type": "array",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "EmployeeSalary ID",
                  "type": "string"
                },
                "type": {
                  "description": "EmployeeSalary Type (ANNUALSALARY, HOURLY, USEEARNINGSRATE, ENTEREARNINGSRATE)",
                  "type": "string"
                },
                "name": {
                  "description": "EmployeeSalary Name",
                  "type": "string"
                },
                "frequency": {
                  "description": "EmployeeSalary Frequency (WEEKLY, FORTNIGHTLY, MONTHLY)",
                  "type": "string"
                },
                "currency": {
                  "description": "EmployeeSalary currency",
                  "type": "string"
                },
                "annual_salary": {
                  "description": "Annual salary amount",
                  "type": "number"
                },
                "hourly_rate": {
                  "description": "Hourly rate",
                  "type": "number"
                },
                "hours_per_week": {
                  "description": "Default number of hours worked per week",
                  "type": "number"
                },
                "effective_date": {
                  "description": "Date of salary payment",
                  "type": "string",
                  "format": "date-time"
                },
                "pay_item_id": {
                  "description": "Pay Item reference",
                  "type": "string"
                }
              }
            }
          },
          "work_locations": {
            "description": "Employee Work Locations",
            "type": "array",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "EmployeeWorkLocation ID",
                  "type": "string"
                },
                "role": {
                  "description": "Employee role at location",
                  "type": "string"
                },
                "description": {
                  "description": "Employee work location description",
                  "type": "string"
                },
                "primary": {
                  "description": "Employee primary work location (only one work location can be flagged as promary)",
                  "type": "boolean"
                },
                "work_location_id": {
                  "description": "Work Location reference",
                  "type": "string"
                }
              }
            }
          },
          "opening_balances": {
            "description": "Employee Opening Balances",
            "type": "array",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "Employee Opening Balance ID",
                  "type": "string"
                },
                "status": {
                  "description": "Employee Opening Balance (ACTIVE or INACTIVE)",
                  "type": "string"
                },
                "type": {
                  "description": "Employee Opening Balance type",
                  "type": "string"
                },
                "name": {
                  "description": "Employee Opening Balance name",
                  "type": "string"
                },
                "description": {
                  "description": "Employee Opening Balance description",
                  "type": "string"
                },
                "pay_item_id": {
                  "description": "Pay Item reference",
                  "type": "string"
                },
                "units": {
                  "description": "Units allocated",
                  "type": "number"
                },
                "amount": {
                  "description": "Amount allocated",
                  "type": "number"
                },
                "hours": {
                  "description": "Hours allocated",
                  "type": "number"
                },
                "balance": {
                  "description": "Balance allocated",
                  "type": "number"
                },
                "percentage": {
                  "description": "Percentage allocated",
                  "type": "number"
                },
                "rate_per_unit": {
                  "description": "Rate per unit",
                  "type": "string"
                },
                "type_of_units": {
                  "description": "Type on units allocated (HOURS, UNITS)",
                  "type": "string"
                },
                "calculation_type": {
                  "description": "(FIXEDAMOUNT, PERCENTAGEOFEARNINGS, UNIT)",
                  "type": "string"
                },
                "contribution_type": {
                  "description": "(SGC, SALARYSACRIFICE)",
                  "type": "string"
                },
                "tax_type": {
                  "description": "(PAYG Tax, ...)",
                  "type": "string"
                },
                "currency": {
                  "description": "Currency",
                  "type": "string"
                }
              }
            }
          },
          "current_balances": {
            "description": "Employee Current Balances",
            "type": "array",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "Employee Current Balance ID",
                  "type": "string"
                },
                "status": {
                  "description": "Employee Current Balance (ACTIVE or INACTIVE)",
                  "type": "string"
                },
                "type": {
                  "description": "Employee Current Balance type",
                  "type": "string"
                },
                "name": {
                  "description": "Employee Current Balance name",
                  "type": "string"
                },
                "description": {
                  "description": "Employee Current Balance description",
                  "type": "string"
                },
                "pay_item_id": {
                  "description": "Pay Item reference",
                  "type": "string"
                },
                "units": {
                  "description": "Units allocated",
                  "type": "number"
                },
                "amount": {
                  "description": "Amount allocated",
                  "type": "number"
                },
                "hours": {
                  "description": "Hours allocated",
                  "type": "number"
                },
                "balance": {
                  "description": "Balance allocated",
                  "type": "number"
                },
                "percentage": {
                  "description": "Percentage allocated",
                  "type": "number"
                },
                "rate_per_unit": {
                  "description": "Rate per unit",
                  "type": "string"
                },
                "type_of_units": {
                  "description": "Type on units allocated (HOURS, UNITS)",
                  "type": "string"
                },
                "calculation_type": {
                  "description": "(FIXEDAMOUNT, PERCENTAGEOFEARNINGS, UNIT)",
                  "type": "string"
                },
                "contribution_type": {
                  "description": "(SGC, SALARYSACRIFICE)",
                  "type": "string"
                },
                "tax_type": {
                  "description": "(PAYG Tax, ...)",
                  "type": "string"
                },
                "currency": {
                  "description": "Currency",
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "bank_account": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "bank_account": {
          "type": "object",
          "properties": {
            "bic_code": {
              "type": "string"
            },
            "account_number": {
              "type": "string"
            },
            "bsb_number": {
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/employees

Attributes

Field Type Description
resource_type String Resource type name
id String Employee UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
title String Employee title (Mr, Mrs, …)
first_name String Employee first name
last_name String Employee last name
middle_name String Employee middle name
full_name String Employee full name
birth_date Date Time Employee date of birth
gender Enum Gender, one of [MALE, FEMALE]
mno_user_id String Maestrano User ID to match a User created via SSO if applicable
social_security_number String Employee Social Security Number
hired_date Date Time Employment start date
released_date Date Time Employment end date
job_status String Job status (Current, Released, etc…)
bill_rate Number Employee default billing rate
location String Employee location
supervisor String Employee supervisor name
job_title String Employee job title
note String Employee private note
address Address Employee personal address
email Email Person email addresses
phone Phone Person work phone and fax numbers
pay_schedule_id String Employee Pay Schedule reference
bank_accounts Array Person bank accounts details
employee_salaries Array Employee default salary breakdown
work_locations Array Employee Work Locations
opening_balances Array Employee Opening Balances
current_balances Array Employee Current Balances
Employees BankAccounts attributes
Field Type Description
Employees EmployeeSalaries attributes
Field Type Description
id String EmployeeSalary ID
type String EmployeeSalary Type (ANNUALSALARY, HOURLY, USEEARNINGSRATE, ENTEREARNINGSRATE)
name String EmployeeSalary Name
frequency String EmployeeSalary Frequency (WEEKLY, FORTNIGHTLY, MONTHLY)
currency String EmployeeSalary currency
annual_salary Number Annual salary amount
hourly_rate Number Hourly rate
hours_per_week Number Default number of hours worked per week
effective_date Date Time Date of salary payment
pay_item_id String Pay Item reference
Employees WorkLocations attributes
Field Type Description
id String EmployeeWorkLocation ID
role String Employee role at location
description String Employee work location description
primary Boolean Employee primary work location (only one work location can be flagged as promary)
work_location_id String Work Location reference
Employees OpeningBalances attributes
Field Type Description
id String Employee Opening Balance ID
status String Employee Opening Balance (ACTIVE or INACTIVE)
type String Employee Opening Balance type
name String Employee Opening Balance name
description String Employee Opening Balance description
pay_item_id String Pay Item reference
units Number Units allocated
amount Number Amount allocated
hours Number Hours allocated
balance Number Balance allocated
percentage Number Percentage allocated
rate_per_unit String Rate per unit
type_of_units String Type on units allocated (HOURS, UNITS)
calculation_type String (FIXEDAMOUNT, PERCENTAGEOFEARNINGS, UNIT)
contribution_type String (SGC, SALARYSACRIFICE)
tax_type String (PAYG Tax, …)
currency String Currency
Employees CurrentBalances attributes
Field Type Description
id String Employee Current Balance ID
status String Employee Current Balance (ACTIVE or INACTIVE)
type String Employee Current Balance type
name String Employee Current Balance name
description String Employee Current Balance description
pay_item_id String Pay Item reference
units Number Units allocated
amount Number Amount allocated
hours Number Hours allocated
balance Number Balance allocated
percentage Number Percentage allocated
rate_per_unit String Rate per unit
type_of_units String Type on units allocated (HOURS, UNITS)
calculation_type String (FIXEDAMOUNT, PERCENTAGEOFEARNINGS, UNIT)
contribution_type String (SGC, SALARYSACRIFICE)
tax_type String (PAYG Tax, …)
currency String Currency

Employee List

GET https://api-connec.maestrano.com/api/v2/:group_id/employees
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
    "employees": [
        {
          "id": "68d63921-bee9-0132-2fbd-56847afe9799",
          "code": "EM9110",
          "first_name": "Benjamin",
          "last_name": "Wilson",
          "employee_id": "001450",
          "mno_user_id": "usr-afd4",
          "birth_date": "1980-10-17",
          "gender": "MALE",
          "social_security_number": "512-17-4444",
          "hired_date": "2015-04-18",
          "job_title": "Sales Manger",
          "pay_schedule_id": "50847c11-bee9-0132-2f6e-56847afe9799",
          "address": {
            "billing": {
              "line1": "342 De Carlo Ave",
              "city": "Richmond",
              "region": "CA",
              "postal_code": "94801",
              "country": "United States"
            },
            "shipping": {
              "line1": "342 De Carlo Ave",
              "city": "Richmond",
              "region": "CA",
              "postal_code": "94801",
              "country": "United States"
            }
          },
          "email": {
            "address": "ben.wilson@test.com"
          },
          "phone": {
            "landline": "408-123-4567"
          },
          "bank_accounts": [
            {
                "bic_code": "12345-12310",
                "account_number": "78945 4410",
                "bsb_number": "123-123"
            },
          ]
          "employee_salaries": [
            {
              "id": "5523221d0202cb423200d888",
              "type": "HOURLY",
              "name": "Regular Hours",
              "currency": "USD",
              "hourly_rate": 32.5,
              "hours_per_week": 40,
              "pay_item_id": "54fc6fa1-bee9-0132-2f72-56847afe9799"
            },
            {
              "id": "6623221d0202cb423200d8ef",
              "type": "SALARY",
              "frequency": "TWICEAMONTH",
              "name": "Bonus",
              "currency": "USD",
              "hourly_rate": 10.5,
              "hours_per_week": 40,
              "annual_salary": 10000,
              "pay_item_id": "54fc6fa1-bee9-0132-2f72-56847afe9799"
            }
          ],
          "work_locations": [
            {
              "id": "561ef5f30202cbfc3300236b",
              "work_location_id": "398cb8f1-5503-0133-9e89-56847afe9799",
              "role": "Responsible",
              "description": "Responsible for the San Francisco office",
              "primary": true
            },
            {
              "id": "561ef5f30202cbfc3300236d",
              "work_location_id": "3990d7a0-5503-0133-9e8f-56847afe9799",
              "role": "Manager"
            }
          ],
          "updated_at": "2015-04-22T00:58:39.000Z",
          "created_at": "2015-04-07T00:17:33.199Z"
        }
    ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",

  "type": "object",
  "properties": {
    "employees": {
      "id": "employees",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Employee UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "title": {
            "description": "Employee title",
            "type": "string"
          },
          "first_name": {
            "description": "Employee first name",
            "type": "string"
          },
          "last_name": {
            "description": "Employee last name",
            "type": "string"
          },
          "middle_name": {
            "description": "Employee middle name",
            "type": "string"
          },
          "full_name": {
            "description": "Employee full name",
            "type": "string"
          },
          "birth_date": {
            "description": "Employee date of birth",
            "type": "string",
            "format": "date-time"
          },
          "gender": {
            "description": "Employee gender",
            "enum": ["MALE", "FEMALE"]
          },
          "employee_id": {
            "description": "A unique Employee ID",
            "type": "string"
          },
          "mno_user_id": {
            "description": "Maestrano unique user_id",
            "type": "string"
          },
          "social_security_number": {
            "description": "Employee social security number",
            "type": "string"
          },
          hired_date": {
            "description": "Employee work start date",
            "type": "string",
            "format": "date-time"
          },
          released_date": {
            "description": "Employee work end date",
            "type": "string",
            "format": "date-time"
          },
          "job_status": {
            "description": "Employee job status",
            "type": "string"
          },
          "bill_rate": {
            "description": "Employee bill rate",
            "type": "number"
          },
          "location": {
            "description": "Employee work location",
            "type": "string"
          },
          "supervisor": {
            "description": "Employee supervisor name",
            "type": "string"
          },
          "job_title": {
            "description": "Employee job title",
            "type": "string"
          },
          "note": {
            "description": "Note",
            "type": "string"
          },
          "address": {
            "$ref": "#/definitions/address_group"
          },
          "email": {
            "type": "object",
            "properties": {
              "address": {"type": "string", "description": "Primary email address"},
              "address2": {"type": "string", "description": "Secondary email address"}
            }
          },
          "phone": {
            "$ref": "#/definitions/telephone_group"
          },
          "bank_accounts": {
            "description": "Person bank accounts details",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
              "$ref": "#/definitions/bank_account"
          },
          "pay_schedule_id": {
            "description": "Pay Schedule UUID the employee is attached to",
            "type": "string"
          },
          "employee_salaries": {
            "description": "The list of salary components the employee is entitled to",
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "Employee Salary ID",
                    "type": "string"
                  },
                  "type": {
                    "description": "Salary period type",
                    "enum": ["SALARY", "MONTHLY", "HOURLY"]
                  },
                  "frequency": {
                    "description": "Pay frequency, applicable when type is set to SALARY",
                    "enum": ["WEEKLY", "FORTHNIGHTLY", "TWICEAMONTH", "MONTHLY", "YEARLY"]
                  },
                  "name": {
                    "description": "Salary name",
                    "type": "string"
                  },
                  "currency": {
                    "description": "Price currency",
                    "type": "string"
                  },
                  "hourly_rate": {
                    "description": "Salary hourly rate (applicable if type is HOURLY)",
                    "type": "number"
                  },
                  "hours_per_week": {
                    "description": "Regular hours worked per week",
                    "type": "number"
                  },
                  "pay_item_id": {
                    "description": "Reference to the Pay Item",
                    "type": "string"
                  }
                }
              }
            }
          },
          "work_locations": {
            "description": "The list of Work Locations an employee is attached to",
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "Reference of the Work Location",
                    "type": "string"
                  },
                  "work_location_id": {
                    "description": "Reference to the Work Location,
                    "type": "string"
                  },
                  "role": {
                    "description": "Role of the employee for this Work Location,
                    "type": "string"
                  },
                  "description": {
                    "description": "Description of the Employee position at this Work Location,
                    "type": "string"
                  },
                  "primary": {
                    "description": "Is the Employee primary Work Location,
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Get Employee
GET/api/v2/:group_id/employees

Get the list of employees.

Attributes

Field Type Description
id String Employee UUID
group_id String Group ID
created_at Date-time Employee creation date
updated_at Date-time Employee last update date
code String Code, auto-generated if not specified
title String Employee title
first_name String Employee first_name
last_name String Employee last_name
full_name String Employee full_name. Concatenation of title, first_name and last_name if not specified
birth_date Date-time Employee date of birth
gender Enum [FEMALE, MALE]
social_security_number String Employee social security number
job_title String Employee job title
hired_date Date-time Employee work start date
released_date Date-time Employee work end date
job_status String Employee job status
bill_rate Number Employee bill rate
location String Employee work location
supervisor String Employee supervisor name
note String A short note about the employee
employee_id String A uniq employee id
mno_user_id String A uniq Maestrano user id (given during a SSO process)
pay_schedule_id Reference Pay schedule the employee is attached to
address Address group Employee addresses
email Email group Employee emails
phone Phone group Employee phone and fax numbers
bank_accounts Array Employee payment details
employee_salaries Array Salaries the employee may be entitled to
work_locations Array Work locations the employee may work at
Employee salaries attributes
Field Type Description
id String Salary id
type Enum [SALARY, MONTHLY, HOURLY]
frequency Enum Pay frequency, applicable when type is set to SALARY. [WEEKLY, FORTHNIGHTLY, TWICEAMONTH, MONTHLY, YEARLY]
name String Salary name
currency String Salary currency code
annual_salary Number Salary annual amount
hourly_rate Number Salary hourly rate
hours_per_week Number Salary number of hours per week
pay_item_id Reference Pay item associated with the salary
Employee work locations attributes
Field Type Description
id String Employee work location id
work_location_id Reference Work location
role String Employee role at this work location
description String Description of the employee position at this work location
primary Boolean Is the employee primary work location
Bank accounts attributes
Field Type Description
bank_account Bank account Employee bank account payment details

POST https://api-connec.maestrano.com/api/v2/:group_id/employees
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "employees": {
    "first_name": "John",
    "last_name": "Doe",
    "employee_id": "EM0220"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "employees": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "code": "EM17",
    "first_name": "John",
    "last_name": "Doe",
    "employee_id": "EM0220"
  }
}

Create New Employee
POST/api/v2/:group_id/employees

Create a new employee.


Employee

GET https://api-connec.maestrano.com/api/v2/:group_id/employees/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "employees": {
    "id": "3f58a011-5102-0132-65ff-600308937d74",
    "group_id": "cld-f4g8r2g",
    "created_at": "2014-11-18T03:38:13Z",
    "updated_at": "2014-11-18T03:38:13Z",
    "title": "Mr",
    "first_name": "John",
    "last_name": "Doe",
    "full_name": "Mr John Doe",
    "birth_date": "1986-04-02T00:00:00Z",
    "gender": "Male",
    "employee_id": "01410",
    "social_security_number": "554-78562-1140",
    "hired_date": "2012-02-17",
    "released_date": "2012-02-17",
    "job_status": "EMPLOYED",
    "bill_rate": 32.75,
    "location": "San Francisco office",
    "job_title": "Marketing Manager",
    "address": {
      "shipping": {
        "line1": "88 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2088",
        "country": "AU"
      }
    },
    "email": {
      "address": "john@mycompany.com"
    },
    "phone": {
      "landline": "+61 2 8574 1222",
      "mobile": "+61 449 785 122"
    },
    "bank_accounts": [
      {
        "bic_code": "12345-12310",
        "account_number": "78945 4410",
        "bsb_number": "123-123"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Employee
GET/api/v2/:group_id/employees/{id}

Get a single employee.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The employee ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/employees/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "employees": {
    "first_name": "John",
    "last_name": "Doe"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "employees": {
    "id": "3f58a011-5102-0132-65ff-600308937d74",
    "group_id": "cld-f4g8r2g",
    "created_at": "2014-11-18T03:38:13Z",
    "updated_at": "2014-11-18T03:38:13Z",
    "title": "Mr",
    "first_name": "John",
    "last_name": "Doe",
    "full_name": "Mr John Doe",
    "birth_date": "1986-04-02T00:00:00Z",
    "gender": "Male",
    "employee_id": "01410",
    "social_security_number": "554-78562-1140",
    "hired_date": "2012-02-17",
    "released_date": "2012-02-17",
    "job_status": "EMPLOYED",
    "bill_rate": 32.75,
    "location": "San Francisco office",
    "job_title": "Marketing Manager",
    "address": {
      "shipping": {
        "line1": "88 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2088",
        "country": "AU"
      }
    },
    "email": {
      "address": "john@mycompany.com"
    },
    "phone": {
      "landline": "+61 2 8574 1222",
      "mobile": "+61 449 785 122"
    },
    "bank_accounts": [
      {
        "bic_code": "12345-12310",
        "account_number": "78945 4410",
        "bsb_number": "123-123"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Employee
PUT/api/v2/:group_id/employees/{id}

Update a single Employee

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The employee ID


Events

Business Rules

It is possible to automatically generate items from an event ticket_classes using the option generate_items. This is useful for an integration with a CRM to generate items to be used for invoicing.

{
  "events": {
    "opts": {"generate_items": true},
    "ticket_classes": [...]
  }
}

Events JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/events
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "organizations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name"
        ],
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Event UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[DRAFT, LIVE, INACTIVE] - Default: DRAFT",
            "type": "string",
            "format": "enum"
          },
          "name": {
            "description": "Event name",
            "type": "string"
          },
          "description": {
            "description": "Event description",
            "type": "string"
          },
          "url": {
            "description": "Event public page URL",
            "type": "string"
          },
          "timezone": {
            "description": "Event timezone of reference",
            "type": "string"
          },
          "start_date": {
            "description": "Event starting date",
            "type": "string",
            "format": "date-time"
          },
          "end_date": {
            "description": "Event termination date",
            "type": "string",
            "format": "date-time"
          },
          "capacity": {
            "description": "Event total capacity",
            "type": "number"
          },
          "currency": {
            "description": "Event default currency",
            "type": "string"
          },
          "organization_id": {
            "description": "#Organization owning the event",
            "type": "string",
            "format": "reference"
          },
          "person_id": {
            "description": "#Person owning the event",
            "type": "string",
            "format": "reference"
          },
          "venue_id": {
            "description": "#Venue of the Event",
            "type": "string",
            "format": "reference"
          },
          "ticket_classes": {
            "description": "Event tickets types",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "required": [
                "name"
              ],
              "properties": {
                "id": {
                  "description": "Ticket id",
                  "type": "string"
                },
                "code": {
                  "description": "Code, auto-generated if not specified",
                  "type": "string"
                },
                "name": {
                  "description": "Ticket name",
                  "type": "string"
                },
                "description": {
                  "description": "Ticket description",
                  "type": "string"
                },
                "donation": {
                  "description": "Is based on donations",
                  "type": "boolean"
                },
                "free": {
                  "description": "Is a free ticket",
                  "type": "boolean"
                },
                "minimum_quantity": {
                  "description": "Minimum quantity to purchase in a single transaction",
                  "type": "number"
                },
                "maximum_quantity": {
                  "description": "Maximum quantity to purchase in a single transaction",
                  "type": "number"
                },
                "quantity_total": {
                  "description": "Total number of tickets available",
                  "type": "number"
                },
                "quantity_sold": {
                  "description": "Total number of tickets sold",
                  "type": "number"
                },
                "sales_end": {
                  "description": "Ticket sale ending date",
                  "type": "string",
                  "format": "date-time"
                },
                "cost": {
                  "description": "Ticket base price",
                  "$ref": "#/definitions/price"
                },
                "fee": {
                  "description": "Ticket extra fees",
                  "$ref": "#/definitions/price"
                },
                "item_id": {
                  "description": "#Item used in invoices to reference this ticket",
                  "type": "string",
                  "format": "reference"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/events

Attributes

Field Type Description
resource_type String Resource type name
id String Event UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [DRAFT, LIVE, INACTIVE] - Default: DRAFT
name String Event name
description String Event description
url String Event public page URL
timezone String Event timezone of reference
start_date Date Time Event starting date
end_date Date Time Event termination date
capacity Number Event total capacity
currency String Event default currency
organization_id Reference Organization owning the event
person_id Reference Person owning the event
venue_id Reference Venue of the Event
ticket_classes Array Event tickets types
Events TicketClasses attributes
Field Type Description
id String Ticket id
code String Code, auto-generated if not specified
name String Ticket name
description String Ticket description
donation Boolean Is based on donations
free Boolean Is a free ticket
minimum_quantity Number Minimum quantity to purchase in a single transaction
maximum_quantity Number Maximum quantity to purchase in a single transaction
quantity_total Number Total number of tickets available
quantity_sold Number Total number of tickets sold
sales_end Date Time Ticket sale ending date
cost Price Ticket base price
fee Price Ticket extra fees
item_id Reference Item used in invoices to reference this ticket

Events List

GET https://api-connec.maestrano.com/api/v2/:group_id/events
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "events": [
    {
      "id": "8d654e30-d8aa-0133-31c9-027f396e04cb",
      "code": "EV1",
      "status": "LIVE",
      "name": "Xavier concert",
      "description": "<P>Music and stuff</P>",
      "url": "http://www.eventbrite.com.au/e/xavier-concert-tickets-24287850615",
      "start_date": "2016-05-09T23:00:00Z",
      "end_date": "2016-05-10T02:00:00Z",
      "capacity": 102,
      "currency": "USD",
      "organization_id": "d9c3491-d8ab-2345-31ea-027f396e08ui",
      "person_id": "p5c3491-d8ab-3344-31ea-027f396e02qw",
      "venue_id": "b7c3491-d8ab-0133-31ea-027f396e04cb",
      "ticket_classes": [
        {
          "id": "56fbd6bcdace114f85136eba",
          "name": "Friends",
          "donation": false,
          "free": true,
          "minimum_quantity": 1,
          "quantity_total": 2,
          "quantity_sold": 1,
          "sales_end": "2016-05-09T22:00:00Z",
          "cost": {},
          "fee": {},
          "item_id": "8d6ffc91-d8aa-0133-31cf-027f396e04cb"
        },
        {
          "id": "56fbd6bcdace114f85136ebc",
          "name": "People",
          "donation": false,
          "free": false,
          "minimum_quantity": 1,
          "quantity_total": 100,
          "quantity_sold": 0,
          "sales_end": "2016-05-09T22:00:00Z",
          "cost": {
            "total_amount": 8.54,
            "currency": "USD"
          },
          "fee": {
            "total_amount": 1.2,
            "currency": "USD"
          },
          "item_id": "8d76da50-d8aa-0133-31d3-027f396e04cb"
        }
      ],
      "created_at": "2016-03-30T13:38:04Z",
      "updated_at": "2016-03-30T13:47:22Z",
      "channel_id": "org-fgjg",
      "resource_type": "events"
    }
  ],
  "pagination": {
    "skip": 0,
    "top": 100,
    "total": 1
  }
}

Get Events
GET/api/v2/:group_id/events

Get the list of events.

Attributes

Field Type Description
id String Event UUID
group_id String Group ID
created_at Date-time Event creation date
updated_at Date-time Event last update date
code String Code, auto-generated if not specified
status Enum [DRAFT, LIVE, INACTIVE] - Default: DRAFT
name String Event name
description String Event description
url String Url of the event website or tickets
start_date Date-time Event start date
end_date Date-time Event end date
capacity Number Maximum number of attendees
currency String Event currency code
organization_id Reference The organization organizing the event
person_id Reference The contact organizing the event
venue_id Reference Venue the event occurs at
ticket_classes Array Types of ticket available for this event
Ticket classes attributes
Field Type Description
id String Ticket class id
name String Ticket class name
description String Ticket class description
donation Boolean Can guests make donations
free Boolean Is ticket class free
minimum_quantity Number Minimum number of ticket per order
maximum_quantity Number Maximum number of ticket per order
quantity_total Number Number of available tickets of this class
quantity_total Number Number of sold tickets of this class
sales_end Date-time Last date to buy ticket
cost Price Ticket price
fee Price Additional fee for ticket purchase
item_id Reference Item representing such a ticket. An item should be created to be able to create invoices relative to this ticket

POST https://api-connec.maestrano.com/api/v2/:group_id/events
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "events": {
        "name": "Birthday",
        "start_date": "2016-05-09T23:00:00Z",
    }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "events": {
    "id": "fafc0751-d8b3-0133-c94c-067594f4f433",
    "code": "EV7",
    "status": "DRAFT",
    "name": "Birthday",
    "start_date": "2016-05-09T23:00:00Z",
    "ticket_classes": [],
    "created_at": "2016-03-30T14:45:33Z",
    "updated_at": "2016-03-30T14:45:33Z",
    "channel_id": "org-fgjg",
    "resource_type": "events"
  }
}

Create New Event
POST/api/v2/:group_id/events

Create a new event.


Event

GET https://api-connec.maestrano.com/api/v2/:group_id/events/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "events": {
    "id": "8d654e30-d8aa-0133-31c9-027f396e04cb",
    "code": "EV1",
    "status": "LIVE",
    "name": "concert",
    "description": "<P>Music and stuff</P>",
    "url": "http://www.eventbrite.com.au/e/xavier-concert-tickets-24287850615",
    "start_date": "2016-05-09T23:00:00Z",
    "end_date": "2016-05-10T02:00:00Z",
    "capacity": 102,
    "currency": "USD",
    "venue_id": "b7c3491-d8ab-0133-31ea-027f396e04cb",
    "ticket_classes": [
      {
        "id": "56fbd6bcdace114f85136eba",
        "name": "Friends",
        "donation": false,
        "free": true,
        "minimum_quantity": 1,
        "quantity_total": 2,
        "quantity_sold": 1,
        "sales_end": "2016-05-09T22:00:00Z",
        "cost": {},
        "fee": {},
        "item_id": "8d6ffc91-d8aa-0133-31cf-027f396e04cb"
      },
      {
        "id": "56fbd6bcdace114f85136ebc",
        "name": "People",
        "donation": false,
        "free": false,
        "minimum_quantity": 1,
        "quantity_total": 100,
        "quantity_sold": 0,
        "sales_end": "2016-05-09T22:00:00Z",
        "cost": {
          "total_amount": 8.54,
          "currency": "USD"
        },
        "fee": {
          "total_amount": 1.2,
          "currency": "USD"
        },
        "item_id": "8d76da50-d8aa-0133-31d3-027f396e04cb"
      }
    ],
    "created_at": "2016-03-30T13:38:04Z",
    "updated_at": "2016-03-30T13:47:22Z",
    "channel_id": "org-fgjg",
    "resource_type": "events"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Event
GET/api/v2/:group_id/events/{id}

Get a single event.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The event ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/events/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "events": {
    "name": "concert"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "events": {
    "id": "8d654e30-d8aa-0133-31c9-027f396e04cb",
    "code": "EV1",
    "status": "LIVE",
    "name": "concert",
    "description": "<P>Music and stuff</P>",
    "url": "http://www.eventbrite.com.au/e/xavier-concert-tickets-24287850615",
    "start_date": "2016-05-09T23:00:00Z",
    "end_date": "2016-05-10T02:00:00Z",
    "capacity": 102,
    "currency": "USD",
    "venue_id": "b7c3491-d8ab-0133-31ea-027f396e04cb",
    "ticket_classes": [
      {
        "id": "56fbd6bcdace114f85136eba",
        "name": "Friends",
        "donation": false,
        "free": true,
        "minimum_quantity": 1,
        "quantity_total": 2,
        "quantity_sold": 1,
        "sales_end": "2016-05-09T22:00:00Z",
        "cost": {},
        "fee": {},
        "item_id": "8d6ffc91-d8aa-0133-31cf-027f396e04cb"
      },
      {
        "id": "56fbd6bcdace114f85136ebc",
        "name": "People",
        "donation": false,
        "free": false,
        "minimum_quantity": 1,
        "quantity_total": 100,
        "quantity_sold": 0,
        "sales_end": "2016-05-09T22:00:00Z",
        "cost": {
          "total_amount": 8.54,
          "currency": "USD"
        },
        "fee": {
          "total_amount": 1.2,
          "currency": "USD"
        },
        "item_id": "8d76da50-d8aa-0133-31d3-027f396e04cb"
      }
    ],
    "created_at": "2016-03-30T13:38:04Z",
    "updated_at": "2016-03-30T13:47:22Z",
    "channel_id": "org-fgjg",
    "resource_type": "events"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Event
PUT/api/v2/:group_id/events/{id}

Update a single event

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The event ID


Event Orders

An event order is an order placed on an event by a person for several tickets and people

Business Rules

It is possible to automatically generate invoices and payments from an order using the options generate_invoice and generate_payment. This is useful for an integration with an accounting software to generate invoices and payments for financial reporting.

When generating an Invoice cost, process_fee and attendees_cost are calculated by default from attendees data.

{
  "event_orders": {
    "opts": {"generate_invoice": true, "generate_payment": true},
    "ticket_classes": [...]
  }
}

Event Orders List

GET https://api-connec.maestrano.com/api/v2/:group_id/event_orders
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "event_orders": [
    {
      "id": "91a9aea1-d8aa-0133-31dd-027f396e04cb",
      "code": "EO1",
      "status": "PLACED",
      "event_id": "8d654e30-d8aa-0133-31c9-027f396e04cb",
      "person_id": "8f806600-d8aa-0133-31d7-027f396e04cb",
      "invoice_id": "2q806600-d8aa-2322-31d7-027f396e09uh",
      "payment_id": "6630df75-c47d-426f-a100-ba1054b79084",
      "cost": {
        "total_amount": 0,
        "tax_amount": 0,
        "currency": "USD"
      },
      "process_fee": {
        "net_amount": 0,
        "currency": "USD"
      },
      "payment_fee": {
        "net_amount": 0,
        "currency": "USD"
      },
      "attendees": [
        {
          "id": "91b03e51-d8aa-0133-31e0-027f396e04cb",
          "status": "ATTENDING",
          "quantity": 1,
          "event_ticket_id": "56fbd6bcdace114f85136eba",
          "cost": {
            "total_amount": 0,
            "tax_amount": 0,
            "currency": "USD"
          },
          "process_fee": {
            "net_amount": 0,
            "currency": "USD"
          },
          "payment_fee": {
            "net_amount": 0,
            "currency": "USD"
          },
          "person_id": "8f806600-d8aa-0133-31d7-027f396e04cb"
        }
      ],
      "created_at": "2016-03-30T13:38:11Z",
      "updated_at": "2016-03-30T13:38:11Z",
      "channel_id": "org-fgjg",
      "resource_type": "event_orders"
    }
  ],
  "pagination": {
    "skip": 0,
    "top": 100,
    "total": 1
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "events": {
      "id": "events",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Event order UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "description": "Channel ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "Event order status",
            "enum": [
              "PLACED",
              "REFUNDED",
              "CANCELLED"
            ],
            "default": "PLACED"
          },
          "event_id": {
            "description": "Event UUID the order applies to",
            "type": "string"
          },
          "cost": {
            "$ref": "#/definitions/price"
          },
          "process_fee": {
            "$ref": "#/definitions/price"
          },
          "payment_fee": {
            "$ref": "#/definitions/price"
          },
          "invoice_id": {
            "description": "UUID of the invoice attached",
            "type": "string"
          },
          "payment_id": {
            "description": "UUID of the payment attached",
            "type": "string"
          },
          "attendees": {
            "id": "attendees",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "Attendee id",
                  "type": "string"
                },
                "status": {
                  "description": "Attendee status",
                  "enum": [
                    "ATTENDING",
                    "NOT ATTENDING",
                    "REFUNDED",
                    "CANCELLED"
                  ],
                  "default": "ATTENDING"
                },
                "quantity": {
                  "description": "Quantity of ticket for this attendee",
                  "type": "number"
                },
                "event_ticket_id": {
                  "description": "UUID of the ticket class",
                  "type": "string"
                },
                "cost": {
                  "$ref": "#/definitions/price"
                },
                "process_fee": {
                  "$ref": "#/definitions/price"
                },
                "payment_fee": {
                  "$ref": "#/definitions/price"
                },
                "person_id": {
                  "description": "UUID of the attendee person",
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}

Get Event Orders
GET/api/v2/:group_id/event_orders

Get the list of event orders.

Attributes

Field Type Description
id String Event order UUID
group_id String Group ID
created_at Date-time Event order creation date
updated_at Date-time Event order last update date
code String Code, auto-generated if not specified
status Enum [PLACED, REFUNDED, CANCELLED] - Default: PLACED
event_id Reference Event the order applies to
person_id Reference Person the order was placed by
cost Price Cost of the order
process_fee Price Process fee of the order
payment_fee Price Payment fee of the order
invoice_id Reference Invoice linked to the order
attendees Array Attendees concerned by this order
Event order attendees attributes
Field Type Description
id String Attendee id
status Enum [ATTENDING, NOT ATTENDING, REFUNDED, CANCELLED] - Default: ATTENDING
quantity Number Quantity of ticket for this attendee
event_ticket_id Reference Event ticket class
cost Price Cost for this attendee
process_fee Price Process fee for this attendee
payment_fee Price Payment fee for this attendee
person_id Reference Person representing this attendee

POST https://api-connec.maestrano.com/api/v2/:group_id/event_orders
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "event_orders": {
        "status": "PLACED",
    }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "event_orders": {
    "id": "9907dbc1-d8b6-0133-1ff2-027f396e04cb",
    "code": "EO3",
    "status": "PLACED",
    "cost": {},
    "process_fee": {},
    "payment_fee": {},
    "attendees": [],
    "created_at": "2016-03-30T15:04:17Z",
    "updated_at": "2016-03-30T15:04:17Z",
    "channel_id": "org-fgjg",
    "resource_type": "event_orders"
  }
}

Create New Event Order
POST/api/v2/:group_id/event_orders

Create a new event order.


Event Order

GET https://api-connec.maestrano.com/api/v2/:group_id/event_orders/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "events": {
    "id": "8d654e30-d8aa-0133-31c9-027f396e04cb",
    "code": "EV1",
    "status": "LIVE",
    "name": "concert",
    "description": "<P>Music and stuff</P>",
    "url": "http://www.eventbrite.com.au/e/xavier-concert-tickets-24287850615",
    "start_date": "2016-05-09T23:00:00Z",
    "end_date": "2016-05-10T02:00:00Z",
    "capacity": 102,
    "currency": "USD",
    "venue_id": "b7c3491-d8ab-0133-31ea-027f396e04cb",
    "ticket_classes": [
      {
        "id": "56fbd6bcdace114f85136eba",
        "name": "Friends",
        "donation": false,
        "free": true,
        "minimum_quantity": 1,
        "quantity_total": 2,
        "quantity_sold": 1,
        "sales_end": "2016-05-09T22:00:00Z",
        "cost": {},
        "fee": {},
        "item_id": "8d6ffc91-d8aa-0133-31cf-027f396e04cb"
      },
      {
        "id": "56fbd6bcdace114f85136ebc",
        "name": "People",
        "donation": false,
        "free": false,
        "minimum_quantity": 1,
        "quantity_total": 100,
        "quantity_sold": 0,
        "sales_end": "2016-05-09T22:00:00Z",
        "cost": {
          "total_amount": 8.54,
          "currency": "USD"
        },
        "fee": {
          "total_amount": 1.2,
          "currency": "USD"
        },
        "item_id": "8d76da50-d8aa-0133-31d3-027f396e04cb"
      }
    ],
    "created_at": "2016-03-30T13:38:04Z",
    "updated_at": "2016-03-30T13:47:22Z",
    "channel_id": "org-fgjg",
    "resource_type": "events"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Event
GET/api/v2/:group_id/event_orders/{id}

Get a single event.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The event ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/event_orders/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "events_order": {
    "satuts": "REFUNDED"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "event_orders": {
    "id": "91a9aea1-d8aa-0133-31dd-027f396e04cb",
    "status": "REFUNDED",
    "event_id": "8d654e30-d8aa-0133-31c9-027f396e04cb",
    "person_id": "8f806600-d8aa-0133-31d7-027f396e04cb",
    "cost": {
      "total_amount": 0,
      "tax_amount": 0,
      "currency": "USD"
    },
    "process_fee": {
      "net_amount": 0,
      "currency": "USD"
    },
    "payment_fee": {
      "net_amount": 0,
      "currency": "USD"
    },
    "attendees": [
      {
        "id": "91b03e51-d8aa-0133-31e0-027f396e04cb",
        "status": "ATTENDING",
        "quantity": 1,
        "event_ticket_id": "56fbd6bcdace114f85136eba",
        "cost": {
          "total_amount": 0,
          "tax_amount": 0,
          "currency": "USD"
        },
        "process_fee": {
          "net_amount": 0,
          "currency": "USD"
        },
        "payment_fee": {
          "net_amount": 0,
          "currency": "USD"
        },
        "person_id": "8f806600-d8aa-0133-31d7-027f396e04cb"
      }
    ],
    "created_at": "2016-03-30T13:38:11Z",
    "updated_at": "2016-03-30T13:38:11Z",
    "channel_id": "org-fgjg",
    "resource_type": "event_orders"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Event Order
PUT/api/v2/:group_id/event_orders/{id}

Update a single event order

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The event ID


Invoices

Business Rules

  • If a tax_code_id is specified for an invoice line, the associated tax rate is used to calculate the total_price of the line:
    • CUSTOMER invoice, the tax_code sale_tax_rate is used
    • SUPPLIER invoice, the tax_code purchase_tax_rate is used

Invoices JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/invoices
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "invoices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Invoice UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "title": {
            "description": "Invoice friendly name",
            "type": "string"
          },
          "transaction_number": {
            "description": "Reference number of the Invoice",
            "type": "string"
          },
          "transaction_date": {
            "description": "Invoice creation date, defaults to today if not specified",
            "type": "date-time"
          },
          "due_date": {
            "description": "Invoice due date, defaults to today if not specified",
            "type": "date-time"
          },
          "payment_term": {
            "description": "Payment term",
            "enum": [
              "IMMEDIATE",
              "PIA",
              "NET7",
              "NET10",
              "NET30",
              "NET60",
              "NET90",
              "EOM"
            ]
          },
          "status": {
            "description": "Invoice status",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "AUTHORISED",
              "PAID",
              "VOIDED",
              "INACTIVE"
            ],
            "default": "DRAFT"
          },
          "type": {
            "description": "Invoice type indicates if it is a sale invoice or a purchase invoice",
            "enum": [
              "CUSTOMER",
              "SUPPLIER"
            ],
            "default": "CUSTOMER"
          },
          "balance": {
            "description": "Amount left to be paid",
            "type": "number"
          },
          "deposit": {
            "description": "Amount paid to date",
            "type": "number"
          },
          "discount_percent": {
            "description": "Total discount percentage deducted on the invoice total",
            "type": "number"
          },
          "discount_amount": {
            "description": "Fixed discount amount deducted on the invoice total",
            "type": "number"
          },
          "apply_tax_after_discount": {
            "description": "When discount is a fixed amount, discount to be applied before / after tax (defaults true)",
            "type": "boolean",
            "default": true
          },
          "organization_id": {
            "description": "Reference of the customer or supplier Organization",
            "type": "string"
          },
          "person_id": {
            "description": "Reference of the customer or supplier Person",
            "type": "string"
          },
          "warehouse_id": {
            "description": "Reference of the Warehouse to use for inventory management",
            "type": "string"
          },
          "tax_code_id": {
            "description": "Reference of the applicable Tax Code",
            "type": "string"
          },
          "freight_tax_code_id": {
            "description": "Reference of the applicable shipping Tax Code",
            "type": "string"
          },
          "account_id": {
            "description": "Reference of the Account used for the Invoice",
            "type": "string"
          },
          "tax_calculation": {
            "description": "Tax calculation method for display purpose",
            "enum": [
              "TAX_EXCLUDED",
              "TAX_INCLUSIVE",
              "NOT_APPLICABLE"
            ]
          },
          "sales_order_id": {
            "description": "Reference of parent Sales Order",
            "type": "string"
          },
          "public_note": {
            "description": "Note visible to the customer on the invoice",
            "type": "string"
          },
          "private_note": {
            "description": "Internal note not visible to the customer",
            "type": "string"
          },
          "amount": {
            "$ref": "#/definitions/price",
            "readOnly": true
          },
          "billing_address": {
            "$ref": "#/definitions/address"
          },
          "shipping_address": {
            "$ref": "#/definitions/address"
          },
          "lines": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "Transaction line ID",
                    "type": "string"
                  },
                  "line_number": {
                    "description": "Transaction line number used for ordering",
                    "type": "integer"
                  },
                  "description": {
                    "description": "Transaction line description",
                    "type": "string"
                  },
                  "status": {
                    "description": "Transaction line status",
                    "enum": [
                      "ACTIVE",
                      "INACTIVE"
                    ],
                    "default": "ACTIVE"
                  },
                  "quantity": {
                    "description": "Quantity of Items",
                    "type": "number"
                  },
                  "reduction_percent": {
                    "description": "Reduction percentage applicable",
                    "type": "number"
                  },
                  "unit_price": {
                    "$ref": "#/definitions/price"
                  },
                  "total_price": {
                    "$ref": "#/definitions/price",
                    "readOnly": true
                  },
                  "service_date": {
                    "description": "Delivery date of the item/service",
                    "type": "string",
                    "format": "date-time"
                  },
                  "tax_code_id": {
                    "description": "Reference to the Tax Code applicable on the transaction line",
                    "type": "string"
                  },
                  "item_id": {
                    "description": "Reference to the Item of the transaction line",
                    "type": "string"
                  },
                  "account_id": {
                    "description": "Reference to the Account of the transaction line",
                    "type": "string"
                  },
                  "organization_id": {
                    "description": "Reference of the Customer or Supplier applicable to the transaction line",
                    "type": "string"
                  },
                  "payment_method_id": {
                    "description": "Reference to the Payment Method of the transaction line",
                    "type": "string"
                  },
                  "linked_transactions": {
                    "type": "array",
                    "items": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "description": "LinkedTransaction line ID",
                            "type": "string"
                          },
                          "applied_amount": {
                            "description": "Amount applied on the linked transaction",
                            "type": "number"
                          },
                          "transactionable_id": {
                            "description": "Reference to the Transaction UUID",
                            "type": "string"
                          },
                          "transactionable_type": {
                            "description": "Reference to the Transaction type (Invoice, Payment, CreditNote, etc...)",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/invoices

Attributes

Field Type Description
id String Invoice UUID
group_id String Group ID
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Unique code, auto-generated if not specified
title String Invoice friendly name
transaction_number String Reference number of the Invoice
transaction_date Date Time Invoice creation date, defaults to today if not specified
due_date Date Time Invoice due date, defaults to today if not specified
payment_term Payment term
status Invoice status
type Invoice type indicates if it is a sale invoice or a purchase invoice
balance Number Amount left to be paid
deposit Number Amount paid to date
discount_percent Number Total discount percentage deducted on the invoice total
discount_amount Number Fixed discount amount deducted on the invoice total
apply_tax_after_discount Boolean When discount is a fixed amount, discount to be applied before / after tax (defaults true)
organization_id String Reference of the customer or supplier Organization
person_id String Reference of the customer or supplier Person
warehouse_id String Reference of the Warehouse to use for inventory management
tax_code_id String Reference of the applicable Tax Code
freight_tax_code_id String Reference of the applicable shipping Tax Code
account_id String Reference of the Account used for the Invoice
tax_calculation Tax calculation method for display purpose
sales_order_id String Reference of parent Sales Order
public_note String Note visible to the customer on the invoice
private_note String Internal note not visible to the customer
amount Price
billing_address Address
shipping_address Address
lines Array
Invoices Lines attributes
Field Type Description
id String Transaction line ID
line_number Integer Transaction line number used for ordering
description String Transaction line description
status Transaction line status
quantity Number Quantity of Items
reduction_percent Number Reduction percentage applicable
unit_price Price
total_price Price
service_date Date Time Delivery date of the item/service
tax_code_id String Reference to the Tax Code applicable on the transaction line
item_id String Reference to the Item of the transaction line
account_id String Reference to the Account of the transaction line
organization_id String Reference of the Customer or Supplier applicable to the transaction line
payment_method_id String Reference to the Payment Method of the transaction line
linked_transactions Array
Invoices LinkedTransactions attributes
Field Type Description
id String LinkedTransaction line ID
applied_amount Number Amount applied on the linked transaction
transactionable_id String Reference to the Transaction UUID
transactionable_type String Reference to the Transaction type (Invoice, Payment, CreditNote, etc…)

Invoices List

GET https://api-connec.maestrano.com/api/v2/:group_id/invoices
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "invoices": [
    {
      "id": "b3f169f0-5a96-0132-30de-600308937d74",
      "group_id": "cld-fd45gf12",
      "created_at": "2014-11-30T08:13:34Z",
      "updated_at": "2014-11-30T08:13:34Z",
      "code": "171",
      "title": "Stationery supplies for 2015",
      "transaction_number": "SUP2015",
      "transaction_date": "2015-01-12T00:00:00Z",
      "due_date": "2015-01-31T00:00:00Z",
      "payment_term": "IMMEDIATE",
      "status": "DRAFT",
      "type": "CUSTOMER",
      "balance": 33,
      "deposit": 0,
      "discount_percent": 0,
      "discount_amount": 0,
      "public_note": "Thanks for shopping with us!",
      "private_note": "Private note",
      "tax_calculation": "NOT_APPLICABLE",
      "tax_code_id": "d6ce0371-5a96-0132-30cb-600308937d02",
      "freight_tax_code_id": "e8ce0371-5a96-0132-30cb-600308937d11",
      "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
      "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
      "account_id": "x2ce0371-5a96-0132-30cb-600308937d34",
      "sales_order_id": "w6ce0371-5a96-0132-30cb-600308937d66",
      "currency_rate": 0.8794,
      "amount": {
        "total_amount": 33,
        "net_amount": 30,
        "tax_amount": 3,
        "tax_rate": 10,
        "currency": "USD"
      },
      "billing_address": {
        "line1": "210 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2000",
        "country": "AU"
      },
      "shipping_address": {
        "line1": "210 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2000",
        "country": "AU"
      },
      "lines": [
        {
          "id": "54b323b30202cbd6da000be5",
          "line_number": 1,
          "description": "2015 notebook",
          "status": "ACTIVE",
          "quantity": 10,
          "unit_price": {
            "total_amount": 1.1,
            "net_amount": 1,
            "tax_amount": 0.1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "total_price": {
            "total_amount": 11,
            "net_amount": 10,
            "tax_amount": 1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
          "item_id": "b3d52f61-5a96-0132-30ce-600308937d74",
          "account_id": "q2d52f61-5a96-0132-30ce-600308937dsx"
        },
        {
          "id": "54b323b70202cbd6da000dbb",
          "line_number": 2,
          "description": "2015 calendar A3 format",
          "status": "ACTIVE",
          "quantity": 2,
          "unit_price": {
            "total_amount": 11,
            "net_amount": 10,
            "tax_amount": 1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "total_price": {
            "total_amount": 22,
            "net_amount": 20,
            "tax_amount": 2,
            "tax_rate": 10,
            "currency": "USD"
          },
          "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
          "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74"
        }
      ]
    }
  ]
}

Get Invoices
GET/api/v2/:group_id/invoices

Get the list of invoices.


POST https://api-connec.maestrano.com/api/v2/:group_id/invoices
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "invoices": {
        "due_date": "2014-12-05T08:13:31Z",
        "title": "Team meeting catering 12-01-2015",
        "status": "DRAFT",
        "type": "SUPPLIER",
        "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
        "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
        "lines: [
            {
                "id: "54b323b30202cbd6da000be5",
                "line_number": 1,
                "description: "Medium size pizza",
                "quantity: 6,
                "unit_price: {
                    "total_amount: 16.5,
                    "net_amount: 15.0,
                    "tax_amount: 1.5,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799",
                "item_id: "ddc285c1-5a96-0132-31b8-600308937d74"
            },
            {
                "id: "54b323b70202cbd6da000dbb",
                "line_number": 2,
                "description: "Mixed salad",
                "quantity: 2,
                "unit_price: {
                    "total_amount: 13.2,
                    "net_amount: 12.0,
                    "tax_amount: 1.2,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799"
            }
        ]
    }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
    "invoices": {
        "id": "e32303c1-5102-0132-661e-600308937d74",
        "group_id": "cld-4d7f86",
        "created_at": "2014-12-18T03:42:45Z",
        "updated_at": "2014-12-18T03:42:45Z",
        "due_date": "2014-12-05T08:13:31Z",
        "status": "DRAFT",
        "type": "SUPPLIER",
        "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
        "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
        "currency_rate": 0.8794,
        "amount": {
            "total_amount": 125.4,
            "net_amount": 113.0,
            "tax_amount": 11.4,
            "tax_rate": 10.0,
            "currency": "USD"
        },
        "lines: [
            {
                "id: "line1",
                "line_number": 1,
                "description: "Medium size pizza",
                "quantity: 6,
                "unit_price: {
                    "total_amount: 16.5,
                    "net_amount: 15.0,
                    "tax_amount: 1.5,
                    "tax_rate: 10.0
                },
                "total_price: {
                    "total_amount: 99.0,
                    "net_amount: 90.0,
                    "tax_amount: 9.0,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799",
                "item_id: "ddc285c1-5a96-0132-31b8-600308937d74"
            },
            {
                "id: "line2",
                "line_number": 2,
                "description: "Mixed salad",
                "quantity: 2,
                "unit_price: {
                    "total_amount: 13.2,
                    "net_amount: 12.0,
                    "tax_amount: 1.2,
                    "tax_rate: 10.0
                },
                "total_price: {
                    "total_amount: 26.4,
                    "net_amount: 24.0,
                    "tax_amount: 2.4,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799"
            }
        ]
    }
}

Create New Invoice
POST/api/v2/:group_id/invoices

Create a new invoice.


Invoice

GET https://api-connec.maestrano.com/api/v2/:group_id/invoices/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "invoices": {
    "id": "b3f169f0-5a96-0132-30de-600308937d74",
    "group_id": "cld-fd45gf12",
    "created_at": "2014-11-30T08:13:34Z",
    "updated_at": "2014-11-30T08:13:34Z",
    "transaction_number": "txn_00005",
    "transaction_date": "2014-11-30T08:13:31Z",
    "due_date": "2014-12-05T08:13:31Z",
    "status": "DRAFT",
    "type": "CUSTOMER",
    "balance": 26,
    "deposit": 0,
    "discount_percent": 0,
    "discount_amount": 0,
    "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
    "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
    "currency_rate": 0.8794,
    "amount": {
      "total_amount": 33,
      "net_amount": 30,
      "tax_amount": 3,
      "tax_rate": 10,
      "currency": "USD"
    },
    "billing_address": {
      "line1": "62 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2062",
      "country": "AU"
    },
    "shipping_address": {
      "line1": "64 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2064",
      "country": "AU"
    },
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 1,
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 10,
          "net_amount": 9,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      },
      {
        "id": "54b323b70202cbd6da000dbb",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 2,
        "status": "ACTIVE",
        "quantity": 2,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 22,
          "net_amount": 20,
          "tax_amount": 2,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Invoice
GET/api/v2/:group_id/invoices/{id}

Get a single invoice.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The invoice ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/invoices/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "invoices": {
        "due_date": "2015-31-01T00:00:00Z",
        "status": "AUTHORIZED",
        "lines: [
            {
                "id": "54b323b30202cbd6da000be5",
                "quantity": 6
            }
        }
    }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "invoices": {
    "id": "b3f169f0-5a96-0132-30de-600308937d74",
    "group_id": "cld-fd45gf12",
    "created_at": "2014-11-30T08:13:34Z",
    "updated_at": "2014-11-30T08:13:34Z",
    "transaction_number": "txn_00005",
    "transaction_date": "2014-11-30T08:13:31Z",
    "due_date": "2014-12-05T08:13:31Z",
    "status": "DRAFT",
    "type": "CUSTOMER",
    "balance": 26,
    "deposit": 0,
    "discount_percent": 0,
    "discount_amount": 0,
    "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
    "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
    "currency_rate": 0.8794,
    "amount": {
      "total_amount": 33,
      "net_amount": 30,
      "tax_amount": 3,
      "tax_rate": 10,
      "currency": "USD"
    },
    "billing_address": {
      "line1": "62 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2062",
      "country": "AU"
    },
    "shipping_address": {
      "line1": "64 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2064",
      "country": "AU"
    },
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 1,
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 10,
          "net_amount": 9,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      },
      {
        "id": "54b323b70202cbd6da000dbb",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 2,
        "status": "ACTIVE",
        "quantity": 2,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 22,
          "net_amount": 20,
          "tax_amount": 2,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Invoice
PUT/api/v2/:group_id/invoices/{id}

Update a single Invoice. For an invoice line to be deleted, the status of the invoice line must be set to “INACTIVE”

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The invoice ID


Items

Represents a product or service to be purchased or sold.

Items JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/items
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Item UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "name": {
            "description": "Item name",
            "type": "string"
          },
          "code": {
            "description": "Item code. Must be unique if specified otherwise it will be auto-generated",
            "type": "string"
          },
          "reference": {
            "description": "Item reference number",
            "type": "string"
          },
          "description": {
            "description": "Item description",
            "type": "string"
          },
          "status": {
            "description": "Item status",
            "enum": [
              "ACTIVE",
              "INACTIVE"
            ],
            "default": "ACTIVE"
          },
          "type": {
            "description": "Item type",
            "enum": [
              "PURCHASED",
              "MANUFACTURED",
              "SERVICE",
              "ACTIVITY",
              "ASSET"
            ]
          },
          "unit": {
            "description": "Item unit measure (piece, dozen, kg, ...)",
            "type": "string"
          },
          "quantity_per_unit": {
            "description": "Item quantity per unit (1, 12, 100, ...)",
            "type": "number"
          },
          "weight": {
            "description": "Item weight",
            "type": "number"
          },
          "weight_unit": {
            "description": "Item weight unit (g, kg, tonnes, pounds, ...)",
            "type": "string"
          },
          "length": {
            "description": "Item length",
            "type": "number"
          },
          "length_unit": {
            "description": "Item length unit (mm, cm, m, foot, inch, ...)",
            "type": "string"
          },
          "area": {
            "description": "Item area",
            "type": "number"
          },
          "area_unit": {
            "description": "Item area unit (mm2, cm2, m2, ft2, in2, ...)",
            "type": "string"
          },
          "volume": {
            "description": "Item volume",
            "type": "number"
          },
          "volume_unit": {
            "description": "Item volume unit (liters, ounce, galion, mm3, cm3, m3, ft3, in3, ...)",
            "type": "string"
          },
          "sale_price": {
            "$ref": "#/definitions/price"
          },
          "purchase_price": {
            "$ref": "#/definitions/price"
          },
          "parent_item_id": {
            "description": "UUID of the parent Item",
            "type": "string"
          },
          "is_inventoried": {
            "description": "Flag set if Item is inventoried by an external application. This application is charged of updating quantities accordingly",
            "type": "boolean"
          },
          "initial_quantity": {
            "description": "Initial stock quantity",
            "type": "number"
          },
          "quantity_on_hand": {
            "description": "Quantity physically in stock",
            "type": "number"
          },
          "quantity_committed": {
            "description": "Quantity comitted to be delivered to customers",
            "type": "number"
          },
          "quantity_on_order": {
            "description": "Quantity purchased to be delivered",
            "type": "number"
          },
          "quantity_available": {
            "description": "Quantity available for selling",
            "type": "number"
          },
          "average_cost": {
            "description": "Average item cost to calculate inventory total value",
            "type": "number"
          },
          "current_value": {
            "description": "Item inventory total value",
            "type": "number"
          },
          "sale_tax_code_id": {
            "description": "TaxCode UUID applicable when selling item",
            "type": "string"
          },
          "purchase_tax_code_id": {
            "description": "TaxCode UUID applicable when purchasing item",
            "type": "string"
          },
          "sale_account_id": {
            "description": "Account UUID applicable when selling item",
            "type": "string"
          },
          "purchase_account_id": {
            "description": "Account UUID applicable when purchasing item",
            "type": "string"
          },
          "asset_account_id": {
            "description": "Asset Account UUID if type is ASSET",
            "type": "string"
          },
          "depreciation_account_id": {
            "description": "Depreciation Account UUID if type is ASSET",
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/items

Attributes

Field Type Description
id String Item UUID
group_id String Group ID
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
name String Item name
code String Item code. Must be unique if specified otherwise it will be auto-generated
reference String Item reference number
description String Item description
status Item status
type Item type
unit String Item unit measure (piece, dozen, kg, …)
quantity_per_unit Number Item quantity per unit (1, 12, 100, …)
weight Number Item weight
weight_unit String Item weight unit (g, kg, tonnes, pounds, …)
length Number Item length
length_unit String Item length unit (mm, cm, m, foot, inch, …)
area Number Item area
area_unit String Item area unit (mm2, cm2, m2, ft2, in2, …)
volume Number Item volume
volume_unit String Item volume unit (liters, ounce, galion, mm3, cm3, m3, ft3, in3, …)
sale_price Price
purchase_price Price
parent_item_id String UUID of the parent Item
is_inventoried Boolean Flag set if Item is inventoried by an external application. This application is charged of updating quantities accordingly
initial_quantity Number Initial stock quantity
quantity_on_hand Number Quantity physically in stock
quantity_committed Number Quantity comitted to be delivered to customers
quantity_on_order Number Quantity purchased to be delivered
quantity_available Number Quantity available for selling
average_cost Number Average item cost to calculate inventory total value
current_value Number Item inventory total value
sale_tax_code_id String TaxCode UUID applicable when selling item
purchase_tax_code_id String TaxCode UUID applicable when purchasing item
sale_account_id String Account UUID applicable when selling item
purchase_account_id String Account UUID applicable when purchasing item
asset_account_id String Asset Account UUID if type is ASSET
depreciation_account_id String Depreciation Account UUID if type is ASSET

Items List

GET https://api-connec.maestrano.com/api/v2/:group_id/items
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "items": [
    {
      "id": "ddc285c1-5a96-0132-31b8-600308937d74",
      "group_id": "cld-4sdf712",
      "created_at": "2014-11-30T08:14:44Z",
      "updated_at": "2014-11-30T08:14:44Z",
      "name": "Headset",
      "code": "IT1",
      "reference": "HDSET-7",
      "description": "A Pair of Headsets",
      "status": "ACTIVE",
      "type": "PURCHASED",
      "unit": "EACH",
      "quantity_per_unit": 1,
      "is_inventoried": false,
      "sale_price": {
        "total_amount": 0,
        "net_amount": 0,
        "tax_amount": 0,
        "tax_rate": 10,
        "currency": "USD"
      },
      "purchase_price": {
        "total_amount": 110,
        "net_amount": 100,
        "tax_amount": 10,
        "tax_rate": 10,
        "currency": "USD"
      },
      "parent_item_id": "aac2faf1-5a96-0132-31b9-600308937d82",
      "purchase_tax_code_id": "bec2faf1-5a96-0132-31b9-600308937d66",
      "purchase_account_id": "wgy2faf1-5a96-0132-31b9-600308937h75",
      "asset_account_id": "iuy2faf1-5a96-0132-31b9-600308937h09",
      "depreciation_account_id": "iuy2faf1-5a96-0132-31b9-600098936h09"
    }
  ]
}

Get Items
GET/api/v2/:group_id/items

Get the list of items.

Attributes

Field Type Description
id String Item UUID
group_id String Group ID
created_at Date-time Item creation date
updated_at Date-time Item last update date
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
name String Item name
reference String Main item reference exposed to the user in an application (SKU or part number)
description String Item description
type Enum [PURCHASED, MANUFACTURED, SERVICE, ACTIVITY, ASSET] Product should be either PURCHASED or MANUFACTURED
unit String Item unit measure (piece, dozen, kg, …)
quantity_per_unit Number Item quantity per unit (1, 12, 100, …)
is_inventoried Boolean Flag set if item is inventoried by an external application. This application is charged of updating quantities accordingly
initial_quantity Number Initial stock quantity
quantity_on_hand Number Quantity physically in stock
quantity_committed Number Quantity comitted to be delivered to customers
quantity_on_order Number Quantity purchased to be delivered
quantity_available Number Quantity available for selling
average_cost Number Average item cost to calculate inventory total value
current_value Number Item inventory total value
minimum_quantity Number Minimum quantity per order
weight Number Item weight
weight_unit String Item weight unit (g, kg, tonnes, pounds, …)
length Number Item length
length_unit String Item length unit (mm, cm, m, foot, inch, …)
area Number Item area
area_unit String Item area unit (mm2, cm2, m2, ft2, in2, …)
volume Number Item volume
volume_unit String Item volume unit (mm3, cm3, m3, ft3, in3, …)
sale_price Price Item sale price
purchase_price Price Item purchase price
sale_tax_code_id Reference Applicable sale tax code
purchase_tax_code_id Reference Applicable purchase tax code
sale_account_id Reference Sale account
purchase_account_id Reference Purchase account
asset_account_id Reference Asset account
depreciation_account_id Reference Depreciation account
parent_item_id Reference Parent item (bundle)

POST https://api-connec.maestrano.com/api/v2/:group_id/items
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "items": {
        "name": "Headset",
        "code": "HDSET-7",
        "description": "A Pair of Headsets",
    }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
    "items": {
        "id": "e32303c1-5102-0132-661e-600308937d74",
        "group_id": "cld-4d7f86",
        "created_at": "2014-12-18T03:42:45Z",
        "updated_at": "2014-12-18T03:42:45Z",
        "name": "Headset",
        "code": "HDSET-7",
        "description": "A Pair of Headsets",
    }
}

Create New Item
POST/api/v2/:group_id/items

Create a new item.


Item

GET https://api-connec.maestrano.com/api/v2/:group_id/items/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
    "items": {
        "id": "ddc285c1-5a96-0132-31b8-600308937d74",
        "group_id": "cld-4sdf712"
        "created_at": "2014-11-30T08:14:44Z",
        "updated_at": "2014-11-30T08:14:44Z",
        "name": "Headset",
        "code": "HDSET-7",
        "description": "A Pair of Headsets",
        "status": "ACTIVE",
        "type": "PURCHASED",
        "unit": "EACH",
        "sale_price": {
            "total_amount": 0.0,
            "net_amount": 0.0,
            "tax_amount": 0.0,
            "tax_rate": 10.0,
            "currency": "USD"
        },
        "purchase_price": {
            "total_amount": 110.0,
            "net_amount": 100.0,
            "tax_amount": 10.0,
            "tax_rate": 10.0,
            "currency": "USD"
        },
        "parent_item_id": "aac2faf1-5a96-0132-31b9-600308937d82"
    }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Item
GET/api/v2/:group_id/items/{id}

Get a single item.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The item ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/items/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "items": {
        "name": "Headset",
        "code": "HDSET-7",
        "description": "A Pair of Headsets",
    }

}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
    "items": {
        "id": "ddc285c1-5a96-0132-31b8-600308937d74",
        "group_id": "cld-4sdf712"
        "created_at": "2014-11-30T08:14:44Z",
        "updated_at": "2014-11-30T08:14:44Z",
        "name": "Headset",
        "code": "HDSET-7",
        "description": "A Pair of Headsets",
        "status": "ACTIVE",
        "type": "PURCHASED",
        "unit": "EACH",
        "sale_price": {
            "total_amount": 0.0,
            "net_amount": 0.0,
            "tax_amount": 0.0,
            "tax_rate": 10.0,
            "currency": "USD"
        },
        "purchase_price": {
            "total_amount": 110.0,
            "net_amount": 100.0,
            "tax_amount": 10.0,
            "tax_rate": 10.0,
            "currency": "USD"
        },
        "parent_item_id": "aac2faf1-5a96-0132-31b9-600308937d82"
    }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Item
PUT/api/v2/:group_id/items/{id}

Update a single Item

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The item ID


Journals

Journals List

GET https://api-connec.maestrano.com/api/v2/:group_id/journals
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "journals": {
    "id": "6cda1291-4219-0133-7892-56847afe9799",
    "status": "ACTIVE",
    "number": 384,
    "reference": "LN384",
    "type": "GENERATED",
    "transaction_reference_id": "7df8949c-b71f-40c0-bbcf-39f2f450f286",
    "transaction_reference_type": "Invoice",
    "date": "2015-07-01T00:00:00Z",
    "creation_date": "2015-09-02T00:00:00Z",
    "journal_lines": [
      {
        "id": "55ff3abe0202cbbb7c003b45",
        "status": "ACTIVE",
        "posting_type": "CREDIT",
        "amount": {
          "total_amount": -19.9,
          "net_amount": -19.9,
          "tax_amount": 0,
          "tax_rate": 0
        },
        "account_id": "215ea5b1-4219-0133-6e65-56847afe9799"
      },
      {
        "id": "55ff3abe0202cbbb7c003b47",
        "status": "ACTIVE",
        "posting_type": "DEBIT",
        "amount": {
          "total_amount": 218.9,
          "net_amount": 218.9,
          "tax_amount": 0,
          "tax_rate": 0
        },
        "account_id": "20fef981-4219-0133-6e4e-56847afe9799"
      },
      {
        "id": "55ff3abe0202cbbb7c003b49",
        "status": "ACTIVE",
        "posting_type": "CREDIT",
        "amount": {
          "total_amount": -199,
          "net_amount": -199,
          "tax_amount": 0,
          "tax_rate": 0
        },
        "tax_code_id": "1a24d300-4219-0133-6d2f-56847afe9799",
        "account_id": "1fa4c0b1-4219-0133-6df1-56847afe9799"
      }
    ],
    "created_at": "2015-09-20T23:01:18Z",
    "updated_at": "2015-09-20T23:01:18Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "journals"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",

  "type": "object",
  "properties": {
    "journals": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Journal UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "Journal entry status",
            "enum": ["ACTIVE", "INACTIVE"],
            "default": "ACTIVE"
          },
          "number": {
            "description": "Journal entry number",
            "type": "number"
          },
          "reference": {
            "description": "Journal entry reference",
            "type": "string"
          },
          "type": {
            "description": "Journal entry type",
            "enum": ["GENERATED", "MANUAL"]
          },
          "transaction_reference_id": {
            "description": "Reference transaction UUID",
            "type": "string"
          },
          "transaction_reference_type": {
            "description": "Reference transaction type, can be one of **Invoice**, **Payment**",
            "type": "string"
          },
          "date": {
            "description": "Reference transaction date",
            "type": "date-time"
          },
          "creation_date": {
            "description": "Journal entry creation date",
            "type": "date-time"
          },
          "journal_lines": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "Journal entry line ID",
                    "type": "string"
                  },
                  "status": {
                    "description": "Journal line status",
                    "enum": ["ACTIVE", "INACTIVE"],
                    "default": "ACTIVE"
                  },
                  "account_id": {
                    "description": "Reference to the Account of the journal line",
                    "type": "string"
                  },
                  "tax_code_id": {
                    "description": "Reference to the TaxCode of the journal line",
                    "type": "string"
                  },
                  "posting_type": {
                    "description": "Journal entry type: Debit or Credit (Credit for negative amounts, Debit for positive amounts)",
                    "enum": ["DEBIT", "CREDIT"]
                  },
                  "amount": {
                    "$ref": "#/definitions/price"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Get Journals
GET/api/v2/:group_id/journals

Get the list of journals.

Attributes

Field Type Description
id String Journal UUID
group_id String Group ID
created_at Date-time Journal creation date
updated_at Date-time Journal last update date
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
number Number Journal entry number
reference String Journal reference
type Enum [GENERATED, MANUAL] GENERATED journal entry are reserved for accounting applications automatically generating Journal entries based on general ledger transactions. All other jounral entries should be flagged as MANUAL
transaction_reference_type Enum [Invoice, Payment]
transaction_reference_id Reference Invoice or payment
date Date-time Transaction date
creation_date Date-time Journal entry creation date
journal_lines Array Journal entry details
Journal lines attributes
Field Type Description
id String Journal line id
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
posting_type Enum [DEBIT, CREDIT]
amount Price Journal line amount. Amounts should be negative for CREDIT and positive for DEBIT
tax_code_id Reference Applicable tax code
account_id Reference Ledger account

POST https://api-connec.maestrano.com/api/v2/:group_id/journals
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "journals": {
    "number": 123,
    "type": "MANUAL",
    "date": "2015-09-18T00:00:00Z",
    "journal_lines": [
      {
        "status": "ACTIVE",
        "amount": {
          "total_amount": -19.9,
          "net_amount": -19.9,
          "tax_amount": 0,
          "tax_rate": 0
        },
        "account_id": "215ea5b1-4219-0133-6e65-56847afe9799"
      },
      {
        "status": "ACTIVE",
        "amount": {
          "total_amount": 218.9,
          "net_amount": 218.9,
          "tax_amount": 0,
          "tax_rate": 0
        },
        "account_id": "20fef981-4219-0133-6e4e-56847afe9799"
      },
      {
        "status": "ACTIVE",
        "amount": {
          "total_amount": -218.9,
          "net_amount": -199,
          "tax_amount": -19.9,
          "tax_rate": 10
        },
        "tax_code_id": "1a24d300-4219-0133-6d2f-56847afe9799",
        "account_id": "1fa4c0b1-4219-0133-6df1-56847afe9799"
      }
    ]
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "journals": {
    "id": "6cda1291-4219-0133-7892-56847afe9799",
    "status": "ACTIVE",
    "number": 123,
    "type": "MANUAL",
    "transaction_reference_id": "7df8949c-b71f-40c0-bbcf-39f2f450f286",
    "transaction_reference_type": "Invoice",
    "date": "2015-09-18T00:00:00Z",
    "journal_lines": [
      {
        "id": "55ff3abe0202cbbb7c003b45",
        "status": "ACTIVE",
        "amount": {
          "total_amount": -19.9,
          "net_amount": -19.9,
          "tax_amount": 0,
          "tax_rate": 0
        },
        "account_id": "215ea5b1-4219-0133-6e65-56847afe9799"
      },
      {
        "id": "55ff3abe0202cbbb7c003b47",
        "status": "ACTIVE",
        "amount": {
          "total_amount": 218.9,
          "net_amount": 218.9,
          "tax_amount": 0,
          "tax_rate": 0
        },
        "account_id": "20fef981-4219-0133-6e4e-56847afe9799"
      },
      {
        "id": "55ff3abe0202cbbb7c003b49",
        "status": "ACTIVE",
        "amount": {
          "total_amount": -218.9,
          "net_amount": -199,
          "tax_amount": -19.9,
          "tax_rate": 10
        },
        "tax_code_id": "1a24d300-4219-0133-6d2f-56847afe9799",
        "account_id": "1fa4c0b1-4219-0133-6df1-56847afe9799"
      }
    ],
    "created_at": "2015-09-20T23:01:18Z",
    "updated_at": "2015-09-20T23:01:18Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "journals"
  }
}

Create New Journal
POST/api/v2/:group_id/journals

Create a new Journal.


Journal

GET https://api-connec.maestrano.com/api/v2/:group_id/journals/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "journals": {
    "id": "6cda1291-4219-0133-7892-56847afe9799",
    "status": "ACTIVE",
    "number": 384,
    "type": "GENERATED",
    "transaction_reference_id": "7df8949c-b71f-40c0-bbcf-39f2f450f286",
    "transaction_reference_type": "Invoice",
    "date": "2015-07-01T00:00:00Z",
    "creation_date": "2015-09-02T00:00:00Z",
    "journal_lines": [
      {
        "id": "55ff3abe0202cbbb7c003b45",
        "status": "ACTIVE",
        "amount": {
          "total_amount": -19.9,
          "net_amount": -19.9,
          "tax_amount": 0,
          "tax_rate": 0
        },
        "account_id": "215ea5b1-4219-0133-6e65-56847afe9799"
      },
      {
        "id": "55ff3abe0202cbbb7c003b47",
        "status": "ACTIVE",
        "amount": {
          "total_amount": 218.9,
          "net_amount": 218.9,
          "tax_amount": 0,
          "tax_rate": 0
        },
        "account_id": "20fef981-4219-0133-6e4e-56847afe9799"
      },
      {
        "id": "55ff3abe0202cbbb7c003b49",
        "status": "ACTIVE",
        "amount": {
          "total_amount": -218.9,
          "net_amount": -199,
          "tax_amount": -19.9,
          "tax_rate": 10
        },
        "tax_code_id": "1a24d300-4219-0133-6d2f-56847afe9799",
        "account_id": "1fa4c0b1-4219-0133-6df1-56847afe9799"
      }
    ],
    "created_at": "2015-09-20T23:01:18Z",
    "updated_at": "2015-09-20T23:01:18Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "journals"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Journal
GET/api/v2/:group_id/journals/{id}

Get a single journal.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The journal ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/journals/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "journals": {
    "status": "INACTIVE",
    "number": 0
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "journals": {
    "id": "6cda1291-4219-0133-7892-56847afe9799",
    "status": "ACTIVE",
    "number": 384,
    "type": "GENERATED",
    "transaction_reference_id": "7df8949c-b71f-40c0-bbcf-39f2f450f286",
    "transaction_reference_type": "Invoice",
    "date": "2015-07-01T00:00:00Z",
    "creation_date": "2015-09-02T00:00:00Z",
    "journal_lines": [
      {
        "id": "55ff3abe0202cbbb7c003b45",
        "status": "ACTIVE",
        "amount": {
          "total_amount": -19.9,
          "net_amount": -19.9,
          "tax_amount": 0,
          "tax_rate": 0
        },
        "account_id": "215ea5b1-4219-0133-6e65-56847afe9799"
      },
      {
        "id": "55ff3abe0202cbbb7c003b47",
        "status": "ACTIVE",
        "amount": {
          "total_amount": 218.9,
          "net_amount": 218.9,
          "tax_amount": 0,
          "tax_rate": 0
        },
        "account_id": "20fef981-4219-0133-6e4e-56847afe9799"
      },
      {
        "id": "55ff3abe0202cbbb7c003b49",
        "status": "ACTIVE",
        "amount": {
          "total_amount": -218.9,
          "net_amount": -199,
          "tax_amount": -19.9,
          "tax_rate": 10
        },
        "tax_code_id": "1a24d300-4219-0133-6d2f-56847afe9799",
        "account_id": "1fa4c0b1-4219-0133-6df1-56847afe9799"
      }
    ],
    "created_at": "2015-09-20T23:01:18Z",
    "updated_at": "2015-09-20T23:01:18Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "journals"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Journal
PUT/api/v2/:group_id/journals/{id}

Update a single Journal. For an journal line to be deleted, the status of the journal line must be set to “INACTIVE”

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The journal ID


Leave applications

Leave applications JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/leave_applications
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "leave_applications": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Leave application UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "title": {
            "description": "Leave application title",
            "type": "string"
          },
          "description": {
            "description": "Leave application description",
            "type": "string"
          },
          "start_date": {
            "description": "Leave application start date",
            "type": "string",
            "format": "date-time"
          },
          "end_date": {
            "description": "Leave application end date",
            "type": "string",
            "format": "date-time"
          },
          "employee_id": {
            "description": "#Employee the application belongs to",
            "type": "string",
            "format": "reference"
          },
          "pay_item_id": {
            "description": "#PayItem the application belongs to",
            "type": "string",
            "format": "reference"
          },
          "leave_periods": {
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "Leave period id",
                  "type": "string",
                  "format": "reference"
                },
                "status": {
                  "description": "[SCHEDULED, PROCESSED, REJECTED]",
                  "type": "string",
                  "format": "enum"
                },
                "units": {
                  "description": "Leave period units",
                  "type": "number"
                },
                "start_date": {
                  "description": "Leave period start date",
                  "type": "string",
                  "format": "date-time"
                },
                "end_date": {
                  "description": "Leave period end date",
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/leave_applications

Attributes

Field Type Description
resource_type String Resource type name
id String Leave application UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
title String Leave application title
description String Leave application description
start_date Date Time Leave application start date
end_date Date Time Leave application end date
employee_id Reference Employee the application belongs to
pay_item_id Reference PayItem the application belongs to
leave_periods Array
LeaveApplications LeavePeriods attributes
Field Type Description
id Reference Leave period id
status Enum [SCHEDULED, PROCESSED, REJECTED]
units Number Leave period units
start_date Date Time Leave period start date
end_date Date Time Leave period end date

Leave applications List

GET https://api-connec.maestrano.com/api/v2/:group_id/leave_applications
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "leave_applications": [
    {
      "id": "41769570-160f-0134-bd2b-745c899ef027",
      "code": "LA3",
      "title": "Going away",
      "description": "Going to France",
      "start_date": "2016-05-17T10:16:03Z",
      "end_date": "2016-08-17T10:16:03Z",
      "employee_id": "3fdf5451-fe46-0133-3241-07f9388f53bd",
      "pay_item_id": "44df5451-fe46-0133-3241-07f9388f53qw",
      "leave_periods": [
        {
          "id": "4567890",
          "status": "SCHEDULED",
          "start_date": "2016-05-17T10:16:03Z",
          "end_date": "2016-08-17T10:16:03Z"
        }
      ],
      "created_at": "2016-06-16T16:42:36Z",
      "updated_at": "2016-06-16T16:42:36Z",
      "group_id": "org-fbba",
      "channel_id": "org-fbba",
      "resource_type": "leave_applications"
    }
  ]
}

Get Leave applications
GET/api/v2/:group_id/leave_applications

Get the list of leave applications.


POST https://api-connec.maestrano.com/api/v2/:group_id/leave_applications
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "leave_applications": {
    "title": "Holidays"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "leave_applications": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "title": "Holidays"
  }
}

Create New Leave application
POST/api/v2/:group_id/leave_applications

Create a new leave application.


Leave application

GET https://api-connec.maestrano.com/api/v2/:group_id/leave_applications/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "leave_applications": {
    "id": "41769570-160f-0134-bd2b-745c899ef027",
    "code": "LA3",
    "title": "Going away",
    "description": "Going to France",
    "start_date": "2016-05-17T10:16:03Z",
    "end_date": "2016-08-17T10:16:03Z",
    "employee_id": "3fdf5451-fe46-0133-3241-07f9388f53bd",
    "pay_item_id": "44df5451-fe46-0133-3241-07f9388f53qw",
    "leave_periods": [
      {
        "id": "4567890",
        "status": "SCHEDULED",
        "start_date": "2016-05-17T10:16:03Z",
        "end_date": "2016-08-17T10:16:03Z"
      }
    ],
    "created_at": "2016-06-16T16:42:36Z",
    "updated_at": "2016-06-16T16:42:36Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "leave_applications"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Leave application
GET/api/v2/:group_id/leave_applications/{id}

Get a single leave application.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The leave application ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/leave_applications/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "leave_applications": {
    "title": "Going away"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "leave_applications": {
    "id": "41769570-160f-0134-bd2b-745c899ef027",
    "code": "LA3",
    "title": "Going away",
    "description": "Going to France",
    "start_date": "2016-05-17T10:16:03Z",
    "end_date": "2016-08-17T10:16:03Z",
    "employee_id": "3fdf5451-fe46-0133-3241-07f9388f53bd",
    "pay_item_id": "44df5451-fe46-0133-3241-07f9388f53qw",
    "leave_periods": [
      {
        "id": "4567890",
        "status": "SCHEDULED",
        "start_date": "2016-05-17T10:16:03Z",
        "end_date": "2016-08-17T10:16:03Z"
      }
    ],
    "created_at": "2016-06-16T16:42:36Z",
    "updated_at": "2016-06-16T16:42:36Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "leave_applications"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a Leave application
PUT/api/v2/:group_id/leave_applications/{id}

Update a single leave application

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The leave application ID


Milestones

Milestones List

GET https://api-connec.maestrano.com/api/v2/:group_id/milestones
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "milestones" : [
    {
      "id": "5724bcf1-5103-0132-6651-600308937d74",
      "group_id": "cld-7gr8e5",
      "created_at": "2014-11-18T03:45:59Z",
      "updated_at": "2015-01-11T03:45:59Z",
      "name": "A milestone",
      "description": "This is a very important milestone",
      "status": "COMPLETED",
      "start_date": "2014-11-20T09:00:00Z",
      "due_date": "2014-12-20T18:00:00Z",
      "completed_date": "2014-12-19T15:00:00Z",
      "task_lists": [
        {
          "id": "5724bdd1-5453-0132-6651-600308937d74"
        }
      ],
      "assignees": [
        {
          "id": "561cedef73673ae4bb000007",
          "role": 'SUPERVISOR',
          "rights": 'ALL',
          "status": 'ACTIVE',
          "app_user_id": "5724bdd1-5453-0132-6651-6003089sdfsdf",
          "team_id": "5724bdd1-5453-0132-6741-6003089sdfsdf"
        },
        {
          "id": "561cedef73673a5bbb0000a1",
          "role": 'RESPONSIBLE',
          "status": 'ACTIVE',
          "app_user_id": "a2b76d01-4f88-0133-c32e-062f2dc812d3"
        }
      ]
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "accounts": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "description": "Milestone UUID",
              "type": "string",
              "readOnly": true
            },
            "group_id": {
              "description": "Group ID",
              "type": "string"
            },
            "created_at": {
              "description": "Object creation timestamp",
              "type": "string",
              "format": "date-time",
              "readOnly": true
            },
            "updated_at": {
              "description": "Object last update timestamp",
              "type": "string",
              "format": "date-time",
              "readOnly": true
            },
            "name": {
              "description": "Milestone name",
              "type": "string"
            },
            "code": {
              "description": "Milestone code, auto-generated if not specified",
              "type": "string"
            },
            "description": {
              "description": "Milestone description",
              "type": "string"
            },
            "status": {
              "description": "Milestone status",
              "enum": ["DRAFT", "STARTED", "COMPLETED", "ARCHIVED", "CANCELED", ...]
            },
            "start_date": {
              "description": "Milestone start date",
              "type": "date-time"
            },
            "due_date": {
              "description": "Milestone end date",
              "type": "date-time"
            },
            "completed_date": {
              "description": "Milestone completion date",
              "type": "date-time"
            },
            "project_id": {
              "description": "Project UUID the milestone belongs to",
              "type": "string"
            },
            "task_lists": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Task List reference ID",
                      "type": "string"
                    }
                  }
                }
              ]
            },
            "assignees": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Assignee entry ID",
                      "type": "string"
                    },
                    "role": {
                      "description": "Role on the Project",
                      "type": "enum",
                      "enum": ["OWNER", "SUPERVISOR", "RESPONSIBLE", "PARTICIPANT"]
                    },
                    "status": {
                      "description": "Assignee status",
                      "enum": ["ACTIVE", "INACTIVE"],
                      "default": "ACTIVE"
                    },
                    "rights": {
                      "description": "Project permissions",
                      "type": "enum",
                      "enum": ["ALL", "READ", "WRITE", "APPROVER"]
                    },
                    "app_user_id": {
                      "description": "Reference to an Application User",
                      "type": "string"
                    },
                    "team_id": {
                      "description": "Reference to a Team of Application Users",
                      "type": "string"
                    },
                    "organization_id": {
                      "description": "Reference to an Organization (customer)",
                      "type": "string"
                    },
                    "person_id": {
                      "description": "Reference to a Person (contact)",
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Get Milestones
GET/api/v2/:group_id/milestones

Get the list of milestones.

Attributes

Field Type Description
id String Milestone UUID
group_id String Group ID
created_at Date-time Milestone creation date
updated_at Date-time Milestone last update date
code String Code, auto-generated if not specified
status Enum [DRAFT, STARTED, COMPLETED, ARCHIVED, CANCELED]
name String Milestone name
start_date Date-time Milestone start date
due_date Date-time Milestone due date
completed_date Date-time Milestone completed date
project_id Reference Project the milestone belongs to
task_lists Array List of task list ids that belong to the milestone
assignees Array Assignees of this milestone
Milestone task lists attributes
Field Type Description
id String Task list UUID
Milestone assignees attributes
Field Type Description
id String Assignee id
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
role Enum [OWNER, SUPERVISOR, RESPONSIBLE, PARTICIPANT]
rights Enum [ALL, READ, WRITE, APPROVER]
app_user_id Reference Application user representing the assignee
team_id Reference Team representing the assignee

POST https://api-connec.maestrano.com/api/v2/:group_id/milestones
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "milestones": {
    "name": "Deliver front end"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "milestones": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "name": "Deliver front end"
  }
}

Create New Milestone
POST/api/v2/:group_id/milestones

Create a new milestone.


Milestone

GET https://api-connec.maestrano.com/api/v2/:group_id/milestones/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "milestones": {
    "id": "5724bcf1-5103-0132-6651-600308937d74",
    "group_id": "cld-7gr8e5",
    "created_at": "2014-11-18T03:45:59Z",
    "updated_at": "2015-01-11T03:45:59Z",
    "name": "My project",
    "description": "This is my own little project",
    "status": "COMPLETED",
    "start_date": "2014-11-20T09:00:00Z",
    "due_date": "2014-12-20T18:00:00Z",
    "completed_date": "2014-12-19T15:00:00Z",
    "task_lists": [
      {
        "id": "5724bdd1-5453-0132-6651-600308937d74"
      }
    ],
    "assignees": [
      {
        "id": "561cedef73673ae4bb000007",
        "role": 'SUPERVISOR',
        "rights": 'ALL',
        "status": 'ACTIVE',
        "app_user_id": "5724bdd1-5453-0132-6651-6003089sdfsdf",
        "team_id": "5724bdd1-5453-0132-6741-6003089sdfsdf"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Milestone
GET/api/v2/:group_id/milestones/{id}

Get a single milestone.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The milestone ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/milestones/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "milestones": {
    "status": "COMPLETED"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "milestones": {
    "id": "5724bcf1-5103-0132-6651-600308937d74",
    "group_id": "cld-7gr8e5",
    "created_at": "2014-11-18T03:45:59Z",
    "updated_at": "2015-01-11T03:45:59Z",
    "name": "My project",
    "description": "This is my own little project",
    "status": "COMPLETED",
    "start_date": "2014-11-20T09:00:00Z",
    "due_date": "2014-12-20T18:00:00Z",
    "completed_date": "2014-12-19T15:00:00Z",
    "task_lists": [
      {
        "id": "5724bdd1-5453-0132-6651-600308937d74"
      }
    ],
    "assignees": [
      {
        "id": "561cedef73673ae4bb000007",
        "role": 'SUPERVISOR',
        "rights": 'ALL',
        "status": 'ACTIVE',
        "app_user_id": "5724bdd1-5453-0132-6651-6003089sdfsdf",
        "team_id": "5724bdd1-5453-0132-6741-6003089sdfsdf"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a Milestone
PUT/api/v2/:group_id/milestones/{id}

Update a single Milestone

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The milestone ID


Opportunities

Business Rules

  • Everytime the sales_stage is changed, a new record will be created in sales_stages_changes, containing the new sales_stage and the date of the update

Opportunities List

GET https://api-connec.maestrano.com/opportunities
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "opportunities": [
    {
      "id": "f4e131e0-cd6a-0133-b422-027f396e04cb",
      "code": "POT1",
      "name": "An opportunity name",
      "description": "Context still needs to be clarified with the customer",
      "sales_stage": "Open",
      "type": "New Business",
      "expected_close_date": "2016-03-28T07:12:51Z",
      "amount": {
        "total_amount": 1080
      },
      "probability": 10,
      "next_step": "Qualification",
      "sales_stage_changes": [
        {
          "status": "Open",
          "created_at": "2016-03-16T06:05:07Z"
        }
      ],
      "created_at": "2016-03-16T06:05:07Z",
      "updated_at": "2016-03-16T07:12:52Z",
      "channel_id": "org-fbba",
      "lead_id": "8be5a2b1-49fd-4844-b740-87965bbbd0bc",
      "assignee_id": "b5dbd78a-26da-4e55-ad84-625b25d67622",
      "assignee_type": "Entity::AppUser",
      "resource_type": "opportunities"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "opportunities": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "sales_stage": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "expected_close_date": {
            "type": "string"
          },
          "amount": {
            "type": "object",
            "properties": {
              "total_amount": {
                "type": "integer"
              }
            }
          },
          "probability": {
            "type": "integer"
          },
          "next_step": {
            "type": "string"
          },
          "sales_stage_changes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string"
                }
              }
            }
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "channel_id": {
            "type": "string"
          },
          "lead_id": {
            "type": "string"
          },
          "assignee_id": {
            "type": "string"
          },
          "assignee_type": {
            "type": "string"
          },
          "resource_type": {
            "type": "string"
          }
        }
      }
    }
  }
}

Get Opportunities
GET/opportunities

Get the list of opportunities.

Attributes

Field Type Description
id String Opportunity UUID
channel_id String Channel ID
created_at Date-time Opportunity creation date
updated_at Date-time Opportunity last update date
code String Code, auto-generated if not specified
name String Opportunity name
description String Opportunity description
sales_stage String “Status” at which the opportunity is
type String Type of the opportunity (as defined in a CRM application)
expected_close_date Date-time Date at which the opportunity is expected to be won
amount Number Opportunity potential amount
probability Number Number from 0 to 100 describing the percentage of probability that the opportunity will be won
next_step String Next step to be achieved to keep the opportunity in the sales pipe (as defined in a CRM application)
sales_stage_changes Array History track of the opportunity’s sales stages
lead_id Reference The opportunity referee lead contact
assignee_id Reference The opportunity assignee (can be Team or AppUser)
Sales stages changes attributes
Field Type Description
id String Line id
status Enum “Status” at which the opportunity was at a point in time
created_at Date-time Date at which the opportunity’s sales stage has been changed

POST https://api-connec.maestrano.com/opportunities
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "opportunities": {
    "code": "POT1",
    "name": "An opportunity name",
    "description": "Context still needs to be clarified with the customer",
    "sales_stage": "Open",
    "type": "New Business",
    "expected_close_date": "2016-03-28T07:12:51Z",
    "amount": {
      "total_amount": 1080
    },
    "probability": 10,
    "next_step": "Qualification",
    "lead_id": "8be5a2b1-49fd-4844-b740-87965bbbd0bc",
    "assignee_id": "b5dbd78a-26da-4e55-ad84-625b25d67622",
    "assignee_type": "Entity::AppUser"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "opportunities": {
    "id": "15a7c661-fec6-0133-bfc8-5fbf8265841f",
    "code": "POT1",
    "name": "An opportunity name",
    "lead_id": "8be5a2b1-49fd-4844-b740-87965bbbd0bc",
    "description": "Context still needs to be clarified with the customer",
    "sales_stage": "Open",
    "type": "New Business",
    "expected_close_date": "2016-03-28T07:12:51Z",
    "amount": {
      "total_amount": 1080
    },
    "probability": 10,
    "next_step": "Qualification",
    "sales_stage_changes": [
      {
        "status": "Open",
        "created_at": "2016-03-16T06:05:07Z"
      }
    ],
    "assignee_type": "Entity::AppUser",
    "assignee_id": "b5dbd78a-26da-4e55-ad84-625b25d67622",
    "created_at": "2016-03-16T06:05:07Z",
    "updated_at": "2016-03-16T06:05:07Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "opportunities"
  }
}

Create New Opportunity
POST/opportunities

Create a new opportunity.


Opportunity

GET https://api-connec.maestrano.com/opportunities/15a7c661-fec6-0133-bfc8-5fbf8265841f
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "opportunities": {
    "id": "15a7c661-fec6-0133-bfc8-5fbf8265841f",
    "code": "POT1",
    "name": "A opportunity name",
    "lead_id": "8be5a2b1-49fd-4844-b740-87965bbbd0bc",
    "description": "Context still needs to be clarified with the customer",
    "sales_stage": "Open",
    "type": "New Business",
    "expected_close_date": "2016-03-28T07:12:51Z",
    "amount": {
      "total_amount": 1080
    },
    "probability": 10,
    "next_step": "Qualification",
    "sales_stage_changes": [
      {
        "status": "Open",
        "created_at": "2016-03-16T06:05:07Z"
      }
    ],
    "assignee_type": "Entity::AppUser",
    "assignee_id": "b5dbd78a-26da-4e55-ad84-625b25d67622",
    "created_at": "2016-03-16T06:05:07Z",
    "updated_at": "2016-03-16T06:05:07Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "opportunities"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "15a7c661-fec6-0133-bfc8-5fbf8265841f",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Opportunity
GET/opportunities/{id}

Get a single opportunity.

URI Parameters
HideShow
id
string (required) Example: 15a7c661-fec6-0133-bfc8-5fbf8265841f

The opportunity ID


PUT https://api-connec.maestrano.com/opportunities/15a7c661-fec6-0133-bfc8-5fbf8265841f
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "opportunities": {
    "sales_stage": "Qualified"
  }
}
Responses200404
Body
{
  "opportunities": {
    "id": "15a7c661-fec6-0133-bfc8-5fbf8265841f",
    "code": "POT1",
    "name": "A opportunity name",
    "lead_id": "8be5a2b1-49fd-4844-b740-87965bbbd0bc",
    "description": "Context still needs to be clarified with the customer",
    "sales_stage": "Qualified",
    "type": "New Business",
    "expected_close_date": "2016-03-28T07:12:51Z",
    "amount": {
      "total_amount": 1080
    },
    "probability": 10,
    "next_step": "Qualification",
    "sales_stage_changes": [
      {
        "status": "Open",
        "created_at": "2016-03-16T06:05:07Z"
      },
      {
        "status": "Qualified",
        "created_at": "2016-03-20T06:05:07Z"
      }
    ],
    "assignee_type": "Entity::AppUser",
    "assignee_id": "b5dbd78a-26da-4e55-ad84-625b25d67622",
    "created_at": "2016-03-16T06:05:07Z",
    "updated_at": "2016-03-20T06:05:07Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "opportunities"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "15a7c661-fec6-0133-bfc8-5fbf8265841f",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Opportunity
PUT/opportunities/{id}

Update a single Opportunity.

URI Parameters
HideShow
id
string (required) Example: 15a7c661-fec6-0133-bfc8-5fbf8265841f

The opportunity ID


Organizations

This endpoint has been deprecated, please use /contacts endpoint instead

An organization represents a third party company and can be a customer, supplier or lead.

Organizations JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/organizations
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "people": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Organization UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
            "type": "string",
            "format": "enum"
          },
          "title": {
            "description": "Organization title (Mr, Mrs, ...)",
            "type": "string"
          },
          "name": {
            "description": "Organization name",
            "type": "string"
          },
          "job_title": {
            "description": "Organization job title",
            "type": "string"
          },
          "birth_date": {
            "description": "Organization date of birth",
            "type": "string",
            "format": "date-time"
          },
          "organization_id": {
            "description": "#Organization the person belongs to",
            "type": "string",
            "format": "reference"
          },
          "is_customer": {
            "description": "Organization is classified as a Customer",
            "type": "boolean"
          },
          "is_supplier": {
            "description": "Organization is classified as a Supplier",
            "type": "boolean"
          },
          "is_lead": {
            "description": "Organization is classified as a Lead",
            "type": "boolean"
          },
          "contact_channel": {
            "description": "Channels to join the contact",
            "$ref": "#/definitions/contact_channel"
          },
          "address": {
            "description": "Organization address",
            "$ref": "#/definitions/address"
          },
          "email": {
            "description": "Organization email addresses",
            "$ref": "#/definitions/email"
          },
          "website": {
            "description": "Organization websites",
            "$ref": "#/definitions/website"
          },
          "phone": {
            "description": "Organization phone and fax numbers",
            "$ref": "#/definitions/phone"
          },
          "lead_status": {
            "description": "Lead status as defined in the CRM application",
            "type": "string"
          },
          "lead_source": {
            "description": "Lead origin as defined in the CRM application",
            "type": "string"
          },
          "lead_status_changes": {
            "description": "History track of the lead statuses",
            "type": "array",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "description": "Lead satus",
                  "type": "string"
                },
                "created_at": {
                  "description": "Date of the lead status change",
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "lead_referent_type": {
            "description": "Entity type of the lead’s referent [Person,Organization]",
            "type": "string",
            "format": "enum"
          },
          "lead_referent_id": {
            "description": "Lead’s referent, can be a #Person or an #Organization",
            "type": "string",
            "format": "reference"
          },
          "assignee_type": {
            "description": "Entity type of the lead’s assignee [AppUser, Team]",
            "type": "string",
            "format": "enum"
          },
          "assignee_id": {
            "description": "Lead’s assignee can be an #AppUser or a #Team",
            "type": "string",
            "format": "reference"
          },
          "referred_leads": {
            "description": "#People that have been referred by this customer or lead",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "Lead UUID",
                  "type": "string",
                  "readOnly": true
                },
                "first_name": {
                  "description": "Lead first name",
                  "type": "string"
                },
                "last_name": {
                  "description": "Lead last name",
                  "type": "string"
                },
                "organization_id": {
                  "description": "#Organization the person belongs to",
                  "type": "string",
                  "format": "reference"
                }
              }
            }
          },
          "opportunities": {
            "description": "#Opportunities linked to this customer or lead",
            "type": "array",
            "ref": "#opportunities"
          },
          "notes": {
            "description": "Notes about the person",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "Note id",
                  "type": "string"
                },
                "description": {
                  "description": "Note content",
                  "type": "string"
                },
                "tag": {
                  "description": "Note tag",
                  "type": "string"
                },
                "value": {
                  "description": "Note value",
                  "type": "string"
                }
              }
            }
          },
          "tasks": {
            "description": "#Tasks attached to this person",
            "type": "array",
            "ref": "#tasks"
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/organizations

Attributes

Field Type Description
resource_type String Resource type name
id String Organization UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
title String Organization title (Mr, Mrs, …)
name String Organization name
job_title String Organization job title
birth_date Date Time Organization date of birth
organization_id Reference Organization the person belongs to
is_customer Boolean Organization is classified as a Customer
is_supplier Boolean Organization is classified as a Supplier
is_lead Boolean Organization is classified as a Lead
contact_channel Contact Channel Channels to join the contact
address Address Organization address
email Email Organization email addresses
website Website Organization websites
phone Phone Organization phone and fax numbers
lead_status String Lead status as defined in the CRM application
lead_source String Lead origin as defined in the CRM application
lead_referent_type Enum Entity type of the lead’s referent [Person,Organization]
lead_referent_id Reference Lead’s referent, can be a Person or an Organization
assignee_type Enum Entity type of the lead’s assignee [AppUser, Team]
assignee_id Reference Lead’s assignee can be an AppUser or a Team
opportunities Array Opportunities linked to this customer or lead
tasks Array Tasks attached to this person
lead_status_changes Array History track of the lead statuses
referred_leads Array People that have been referred by this customer or lead
notes Array Notes about the person
Organizations LeadStatusChanges attributes
Field Type Description
status String Lead satus
created_at Date Time Date of the lead status change
Organizations ReferredLeads attributes
Field Type Description
id String Lead UUID
first_name String Lead first name
last_name String Lead last name
organization_id Reference Organization the person belongs to
Organizations Notes attributes
Field Type Description
id String Note id
description String Note content
tag String Note tag
value String Note value

Organizations List

GET https://api-connec.maestrano.com/api/v2/:group_id/organizations
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "organizations": [
    {
      "id": "e32303c1-5102-0132-661e-600308937d74",
      "group_id": "cld-4d7f86",
      "created_at": "2014-11-18T03:42:45Z",
      "updated_at": "2014-11-18T03:42:45Z",
      "name": "DoeCorp Inc.",
      "reference": "77456",
      "code": "OR2",
      "industry": "Banking",
      "annual_revenue": 1000000,
      "capital": 150000,
      "number_of_employees": 12,
      "is_customer": true,
      "is_supplier": true,
      "is_lead": false,
      "contact_channel": {
        "skype": "doecorp"
      },
      "address": {
        "billing": {
          "line1": "62 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2062",
          "country": "AU"
        },
        "billing2": {
          "line1": "63 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2063",
          "country": "AU"
        },
        "shipping": {
          "line1": "64 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2064",
          "country": "AU"
        },
        "shipping2": {
          "line1": "65 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2065",
          "country": "AU"
        }
      },
      "email": {
        "address": "contact@doecorp.com",
        "address2": "info@doecorp.com"
      },
      "website": {
        "url": "http://www.doecorp.com",
        "url2": "http://www.doecorp.com/contactus"
      },
      "phone": {
        "landline": "+61 2 8574 1216",
        "landline2": "+1 2 8574 1216",
        "mobile": "+61 449 785 116",
        "mobile2": "+1 449 785 116",
        "fax": "+61 2 9974 1216",
        "fax2": "+1 2 9974 1216",
        "pager": "+61 440 785 116",
        "pager2": "+1 440 785 116"
      }
    }
  ]
}

Get Organizations
GET/api/v2/:group_id/organizations

Get the list of organizations.


POST https://api-connec.maestrano.com/api/v2/:group_id/organizations
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "organizations": {
    "name": "Doe Corp Inc.",
    "is_customer": true
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "organizations": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "name": "Doe Corp Inc.",
    "is_customer": true
  }
}

Create New Organization
POST/api/v2/:group_id/organizations

Create a new organization.


Organization

GET https://api-connec.maestrano.com/api/v2/:group_id/organizations/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "organizations": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-11-18T03:42:45Z",
    "updated_at": "2014-11-18T05:42:45Z",
    "name": "DoeCorp Inc.",
    "industry": "Banking",
    "annual_revenue": 800,
    "capital": 8000,
    "number_of_employees": 80,
    "is_customer": true,
    "is_supplier": true,
    "is_lead": true,
    "address": {
      "billing": {
        "line1": "62 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2062",
        "country": "AU"
      },
      "billing2": {
        "line1": "63 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2063",
        "country": "AU"
      },
      "shipping": {
        "line1": "64 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2064",
        "country": "AU"
      },
      "shipping2": {
        "line1": "65 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2065",
        "country": "AU"
      }
    },
    "email": {
      "address": "john13@maestrano.com",
      "address2": "jack13@example.com"
    },
    "website": {
      "url": "www.website13.com",
      "url2": "www.mywebsite13.com"
    },
    "phone": {
      "landline": "+61 2 8574 1216",
      "landline2": "+1 2 8574 1216",
      "mobile": "+61 449 785 116",
      "mobile2": "+1 449 785 116",
      "fax": "+61 2 9974 1216",
      "fax2": "+1 2 9974 1216",
      "pager": "+61 440 785 116",
      "pager2": "+1 440 785 116"
    }
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Organization
GET/api/v2/:group_id/organizations/{id}

Get a single organization.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The organization ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/organizations/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "organizations": {
    "name": "DoeCorp Inc.",
    "is_supplier": true
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "organizations": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-11-18T03:42:45Z",
    "updated_at": "2014-11-18T05:42:45Z",
    "name": "DoeCorp Inc.",
    "industry": "Banking",
    "annual_revenue": 800,
    "capital": 8000,
    "number_of_employees": 80,
    "is_customer": true,
    "is_supplier": true,
    "is_lead": true,
    "address": {
      "billing": {
        "line1": "62 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2062",
        "country": "AU"
      },
      "billing2": {
        "line1": "63 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2063",
        "country": "AU"
      },
      "shipping": {
        "line1": "64 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2064",
        "country": "AU"
      },
      "shipping2": {
        "line1": "65 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2065",
        "country": "AU"
      }
    },
    "email": {
      "address": "john13@maestrano.com",
      "address2": "jack13@example.com"
    },
    "website": {
      "url": "www.website13.com",
      "url2": "www.mywebsite13.com"
    },
    "phone": {
      "landline": "+61 2 8574 1216",
      "landline2": "+1 2 8574 1216",
      "mobile": "+61 449 785 116",
      "mobile2": "+1 449 785 116",
      "fax": "+61 2 9974 1216",
      "fax2": "+1 2 9974 1216",
      "pager": "+61 440 785 116",
      "pager2": "+1 440 785 116"
    }
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Organization
PUT/api/v2/:group_id/organizations/{id}

Update a single Organization

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The organization ID


Payments

Business Rules

  • If the Payment contacts (organization_id or person_id) reference is not set, it will default to the contact of the first linked transaction.

Payments JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/payments
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "payments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Payment UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "title": {
            "description": "Payment friendly name",
            "type": "string"
          },
          "transaction_number": {
            "description": "Reference number of the Payment",
            "type": "string"
          },
          "transaction_date": {
            "description": "Payment creation date, defaults to today if not specified",
            "type": "date-time"
          },
          "amount": {
            "description": "Total Payment amount",
            "type": "number"
          },
          "process_payment": {
            "description": "Payment needs to be processed",
            "type": "boolean",
            "readOnly": true
          },
          "status": {
            "description": "Payment status",
            "enum": [
              "ACTIVE",
              "PAID",
              "VOIDED"
            ],
            "default": "ACTIVE"
          },
          "type": {
            "description": "Payment type indicates if it is a payment sent or received, this should be the same type as the transaction reference",
            "enum": [
              "CUSTOMER",
              "SUPPLIER"
            ],
            "default": "CUSTOMER"
          },
          "organization_id": {
            "description": "Reference of the customer or supplier Organization",
            "type": "string"
          },
          "person_id": {
            "description": "Reference of the customer or supplier Person",
            "type": "string"
          },
          "payment_method_id": {
            "description": "Reference of the Payment Method used",
            "type": "string"
          },
          "account_id": {
            "description": "Reference of the Account used for the Payment",
            "type": "string"
          },
          "public_note": {
            "description": "Note visible to the customer on the payment",
            "type": "string"
          },
          "private_note": {
            "description": "Internal note not visible to the customer",
            "type": "string"
          },
          "payment_lines": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "Transaction line ID",
                    "type": "string"
                  },
                  "line_number": {
                    "description": "Transaction line number used for ordering",
                    "type": "integer"
                  },
                  "description": {
                    "description": "Transaction line description",
                    "type": "string"
                  },
                  "status": {
                    "description": "Transaction line status",
                    "enum": [
                      "ACTIVE",
                      "INACTIVE"
                    ],
                    "default": "ACTIVE"
                  },
                  "quantity": {
                    "description": "Quantity of Items",
                    "type": "number"
                  },
                  "reduction_percent": {
                    "description": "Reduction percentage applicable",
                    "type": "number"
                  },
                  "unit_price": {
                    "$ref": "#/definitions/price"
                  },
                  "total_price": {
                    "$ref": "#/definitions/price",
                    "readOnly": true
                  },
                  "service_date": {
                    "description": "Delivery date of the item/service",
                    "type": "string",
                    "format": "date-time"
                  },
                  "tax_code_id": {
                    "description": "Reference to the Tax Code applicable on the transaction line",
                    "type": "string"
                  },
                  "item_id": {
                    "description": "Reference to the Item of the transaction line",
                    "type": "string"
                  },
                  "account_id": {
                    "description": "Reference to the Account of the transaction line",
                    "type": "string"
                  },
                  "organization_id": {
                    "description": "Reference of the Customer or Supplier applicable to the transaction line",
                    "type": "string"
                  },
                  "payment_method_id": {
                    "description": "Reference to the Payment Method of the transaction line",
                    "type": "string"
                  },
                  "linked_transactions": {
                    "type": "array",
                    "items": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "description": "LinkedTransaction line ID",
                            "type": "string"
                          },
                          "applied_amount": {
                            "description": "Amount applied on the linked transaction",
                            "type": "number"
                          },
                          "transactionable_id": {
                            "description": "Reference to the Transaction UUID",
                            "type": "string"
                          },
                          "transactionable_type": {
                            "description": "Reference to the Transaction type (Invoice, Payment, CreditNote, etc...)",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/payments

Attributes

Field Type Description
id String Payment UUID
group_id String Group ID
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Unique code, auto-generated if not specified
title String Payment friendly name
transaction_number String Reference number of the Payment
transaction_date Date Time Payment creation date, defaults to today if not specified
amount Number Total Payment amount
process_payment Boolean Payment needs to be processed
status Payment status
type Payment type indicates if it is a payment sent or received, this should be the same type as the transaction reference
organization_id String Reference of the customer or supplier Organization
person_id String Reference of the customer or supplier Person
payment_method_id String Reference of the Payment Method used
account_id String Reference of the Account used for the Payment
public_note String Note visible to the customer on the payment
private_note String Internal note not visible to the customer
payment_lines Array
Payments PaymentLines attributes
Field Type Description
id String Transaction line ID
line_number Integer Transaction line number used for ordering
description String Transaction line description
status Transaction line status
quantity Number Quantity of Items
reduction_percent Number Reduction percentage applicable
unit_price Price
total_price Price
service_date Date Time Delivery date of the item/service
tax_code_id String Reference to the Tax Code applicable on the transaction line
item_id String Reference to the Item of the transaction line
account_id String Reference to the Account of the transaction line
organization_id String Reference of the Customer or Supplier applicable to the transaction line
payment_method_id String Reference to the Payment Method of the transaction line
linked_transactions Array
Payments LinkedTransactions attributes
Field Type Description
id String LinkedTransaction line ID
applied_amount Number Amount applied on the linked transaction
transactionable_id String Reference to the Transaction UUID
transactionable_type String Reference to the Transaction type (Invoice, Payment, CreditNote, etc…)

Payments List

GET https://api-connec.maestrano.com/api/v2/:group_id/payments
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "payments": [
    {
      "id": "4d2ff9d1-4fb8-0133-4037-0255a93ecc0b",
      "code": "PA003",
      "title": "Payment 00003",
      "transaction_number": "CR000003",
      "amount": {
        "total_amount": 13200,
        "net_amount": 0,
        "tax_amount": 0,
        "tax_rate": 0,
        "currency": "AUD"
      },
      "transaction_date": "2015-01-17T00:00:00Z",
      "type": "CUSTOMER",
      "public_note": "Thanks!",
      "private_note": "Payment; 24 Lockers",
      "organization_id": "710c1471-4fb7-0133-37d1-0255a93ecc0b",
      "person_id": "430c1471-4fb7-0133-37d1-0255a93ecc8g",
      "account_id": "46a19ec0-4fb7-0133-366d-0255a93ecc0b",
      "payment_method_id": "87a59ec0-4fb7-0133-366d-0255a93ecc0b",
      "payment_lines": [
        {
          "id": "561614c0c52110f21b00454c",
          "status": "ACTIVE",
          "amount": 13200,
          "linked_transactions": [
            {
              "id": "fe946131-4fb7-0133-3dfa-0255a93ecc0b",
              "class": "Invoice"
            }
          ]
        }
      ],
      "created_at": "2015-10-08T07:01:20Z",
      "updated_at": "2015-10-08T07:01:20Z",
      "channel_id": "org-fblp",
      "resource_type": "payments"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "payments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Payment UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "title": {
            "description": "Payment title",
            "type": "string"
          },
          "transaction_number": {
            "description": "Payment reference number",
            "type": "string"
          },
          "amount": {
            "$ref": "#/definitions/price",
            "readOnly": true
          },
          "transaction_date": {
            "description": "Payment date",
            "type": "date-time"
          },
          "type": {
            "description": "Payment type indicates if it is a sale payment or a purchase payment",
            "enum": [
              "CUSTOMER",
              "SUPPLIER"
            ],
            "default": "CUSTOMER"
          },
          "public_note": {
            "description": "Note visible to the customer",
            "type": "string"
          },
          "private_note": {
            "description": "Internal note not visible to the customer",
            "type": "string"
          },
          "organization_id": {
            "description": "Reference of the customer or supplier Organization",
            "type": "string"
          },
          "person_id": {
            "description": "Reference of the customer or supplier Person",
            "type": "string"
          },
          "account_id": {
            "description": "Reference of the account used to deposit funds",
            "type": "string"
          },
          "payment_method_id": {
            "description": "Reference of the payment method used",
            "type": "string"
          },
          "payment_lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "Payment line ID",
                  "type": "string"
                },
                "status": {
                  "description": "Payment line status",
                  "enum": [
                    "ACTIVE",
                    "INACTIVE"
                  ],
                  "default": "ACTIVE"
                },
                "amount": {
                  "description": "Total amount of the payment line",
                  "type": "number"
                },
                "linked_transactions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "description": "Tansaction reference type ",
                        "enum": [
                          "Invoice",
                          "SalesOrder",
                          "PurchaseOrder",
                          "Quote"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Get Payments
GET/api/v2/:group_id/payments

Get the list of payments.

Attributes

Field Type Description
id String Payment UUID
group_id String Group ID
created_at Date-time Payment creation date
updated_at Date-time Payment last update date
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
title String Payment title
transaction_number String Payment number
transaction_date Date-time Payment date
type Enum [CUSTOMER (receiving a payment), SUPPLIER (making a payment)] - Default: CUSTOMER
public_note String Note visible by the customer
private_note String Internal note not visible by the customer
amount Price Payment total amount, calculated with payment_lines
organization_id Reference The payment customer/supplier organization
person_id Reference The payment customer/supplier contact
account_id Reference Account used for the payment
payment_method_id Reference Payment method used for the payment
payment_lines Array Payment details
Payment lines attributes
Field Type Description
id String Line id
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
amount Number Total amount of the payment line
linked_transactions Array List of transactions covered by the payment line
Payment lines linked transaction attributes
Field Type Description
id String UUID of the transaction
class Enum Transaction type: [Quote, Invoice, SalesOrder, PurchaseOrder]

POST https://api-connec.maestrano.com/api/v2/:group_id/payments
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "code": "TRX92344",
  "transaction_number": "CR000004",
  "transaction_date": "2015-01-18T23:00:00Z",
  "type": "CUSTOMER",
  "private_note": "Payment; 24 Lockers",
  "organization_id": "710c1471-4fb7-0133-37d1-0255a93ecc0b",
  "account_id": "1848d801-4fb7-0133-342f-0255a93ecc0b",
  "payment_lines": [
    {
      "id": "561614bcc52110f21b00452a",
      "status": "ACTIVE",
      "amount": 4180,
      "linked_transactions": [
        {
          "id": "fee651c1-4fb7-0133-3dff-0255a93ecc0b",
          "class": "Invoice"
        }
      ]
    }
  ]
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "payment": {
    "id": "4b420c81-4fb8-0133-4008-0255a93ecc0b",
    "code": "TRX92344",
    "transaction_number": "CR000004",
    "amount": {
      "total_amount": 4180,
      "net_amount": 0,
      "tax_amount": 0,
      "tax_rate": 0,
      "currency": "AUD"
    },
    "transaction_date": "2015-01-18T23:00:00Z",
    "type": "CUSTOMER",
    "private_note": "Payment; 24 Lockers",
    "organization_id": "710c1471-4fb7-0133-37d1-0255a93ecc0b",
    "account_id": "1848d801-4fb7-0133-342f-0255a93ecc0b",
    "payment_lines": [
      {
        "id": "561614bcc52110f21b00452a",
        "status": "ACTIVE",
        "amount": 4180,
        "linked_transactions": [
          {
            "id": "fee651c1-4fb7-0133-3dff-0255a93ecc0b",
            "class": "Invoice"
          }
        ]
      }
    ],
    "created_at": "2015-10-08T07:01:16Z",
    "updated_at": "2015-10-08T07:01:16Z",
    "channel_id": "org-fblp",
    "resource_type": "payments"
  }
}

Create New Payment
POST/api/v2/:group_id/payments

Create a new payment.


Payment

GET https://api-connec.maestrano.com/api/v2/:group_id/payments/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "payments": {
    "id": "4b420c81-4fb8-0133-4008-0255a93ecc0b",
    "code": "TRX92344",
    "transaction_number": "CR000004",
    "amount": {
      "total_amount": 4180,
      "net_amount": 0,
      "tax_amount": 0,
      "tax_rate": 0,
      "currency": "AUD"
    },
    "transaction_date": "2015-01-18T23:00:00Z",
    "type": "CUSTOMER",
    "private_note": "Payment; 24 Lockers",
    "organization_id": "710c1471-4fb7-0133-37d1-0255a93ecc0b",
    "account_id": "1848d801-4fb7-0133-342f-0255a93ecc0b",
    "payment_lines": [
      {
        "id": "561614bcc52110f21b00452a",
        "status": "ACTIVE",
        "amount": 4180,
        "linked_transactions": [
          {
            "id": "fee651c1-4fb7-0133-3dff-0255a93ecc0b",
            "class": "Invoice"
          }
        ]
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Payment
GET/api/v2/:group_id/payments/{id}

Get a single payment.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The payment ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/payments/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "payments": {
    "transaction_date": "2015-01-08T11:12:03Z",
    "transaction_number": "44751B54"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "payments": {
    "id": "4b420c81-4fb8-0133-4008-0255a93ecc0b",
    "code": "TRX92344",
    "transaction_number": "CR000004",
    "amount": {
      "total_amount": 4180,
      "net_amount": 0,
      "tax_amount": 0,
      "tax_rate": 0,
      "currency": "AUD"
    },
    "transaction_date": "2015-01-18T23:00:00Z",
    "type": "CUSTOMER",
    "private_note": "Payment; 24 Lockers",
    "organization_id": "710c1471-4fb7-0133-37d1-0255a93ecc0b",
    "account_id": "1848d801-4fb7-0133-342f-0255a93ecc0b",
    "payment_lines": [
      {
        "id": "561614bcc52110f21b00452a",
        "status": "ACTIVE",
        "amount": 4180,
        "linked_transactions": [
          {
            "id": "fee651c1-4fb7-0133-3dff-0255a93ecc0b",
            "class": "Invoice"
          }
        ]
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Payment
PUT/api/v2/:group_id/payments/{id}

Update a single Payment

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The payment ID


Payment Methods

Represents a Payment Method used when processing a Payment

Payment Methods List

GET https://api-connec.maestrano.com/payment_methods
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "payment_methods": [
    {
      "id": "e32303c1-5102-0132-661e-600308937d74",
      "group_id": "cld-4d7f86",
      "created_at": "2016-04-28T13:33:21Z",
      "updated_at": "2016-04-28T13:33:21Z",
      "code": "PM3",
      "name": "Credit card"
    }
  ]
}
Schema
{
"type": "object",
"properties": {
  "payment_methods": {
    "type": "array",
    "items": {
      "type": "object",
      "properties": {
        "id": {
          "description": "Payment method UUID",
          "type": "string",
          "readOnly": true
        },
        "group_id": {
          "description": "Group ID",
          "type": "string"
        },
        "created_at": {
          "description": "Object creation timestamp",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "updated_at": {
          "description": "Object last update timestamp",
          "type": "string",
          "format": "date-time",
          "readOnly": true
        },
        "code": {
          "description": "Unique code, auto-generated if not specified",
          "type": "string"
        },
        "name": {
          "description": "Payment method name",
          "type": "string"
        },
      }
    }
  }
}
}

Get Accounts
GET/payment_methods

Get the list of payment methods.

Attributes

Field Type Description
id String Payment method UUID
group_id String Group ID
created_at Date-time Payment method creation date
updated_at Date-time Payment method last update date
code String Code, auto-generated if not specified
name String Payment method name

POST https://api-connec.maestrano.com/payment_methods
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "payment_methods": {
        "name": "Cash",
    }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
    "payment_methods": {
        "id": "e32303c1-5102-0132-661e-600308937d74",
        "group_id": "cld-4d7f86",
        "created_at": "2014-12-18T03:42:45Z",
        "updated_at": "2014-12-18T03:42:45Z",
        "name": "Cash",
        "code": "PM4",
    }
}

Create New Payment method
POST/payment_methods

Create a new payment method.


Payment Method

GET https://api-connec.maestrano.com/payment_methods/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "payment_methods": {
    "id": "b2befac0-ef73-0133-ff99-0e1cd4468127",
    "group_id": "cld-4d7f86",
    "created_at": "2016-04-28T13:33:21Z",
    "updated_at": "2016-04-28T13:33:21Z",
    "code": "PM3",
    "name": "Credit card"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Payment Method
GET/payment_methods/{id}

Get a single payment method.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The account ID


PUT https://api-connec.maestrano.com/payment_methods/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "payment_method": {
        "name": "Cash",
        "code": "PM3",
    }

}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "payment_methods": {
    "id": "b2befac0-ef73-0133-ff99-0e1cd4468127",
    "group_id": "cld-4d7f86",
    "created_at": "2016-04-28T13:33:21Z",
    "updated_at": "2016-04-28T13:33:21Z",
    "code": "PM3",
    "name": "Credit card"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a Payment Method
PUT/payment_methods/{id}

Update a single payment method

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The account ID


Pay Items

A PayItem represents an entitlement receivable by employees.

PayItems JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/pay_items
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "people": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "PayItem UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
            "type": "string",
            "format": "enum"
          },
          "name": {
            "description": "PayItem name",
            "type": "string"
          },
          "description": {
            "description": "PayItem description",
            "type": "string"
          },
          "type": {
            "description": "PayItem type (, BENEFIT, DEDUCTION, REIMBURSEMENT, TIMEOFF, LEAVE, SUPPERANNUATION, TAX, TAXTABLE)",
            "type": "string",
            "format": "enum"
          },
          "sub_type": {
            "description": "(Regular Hours, Overtime Hours, Bonus, Travel Allowance, Health Insurance, Vacation...)",
            "type": "string"
          },
          "category": {
            "description": "(REGULAREARNINGS, OVERTIMEEARNINGS...)",
            "type": "string"
          },
          "rate_type": {
            "description": "(MULTIPLE, BONUS, FIXEDAMOUNT)",
            "type": "string"
          },
          "calculation_type": {
            "description": "(MANUAL, STANDARDPLAN, PERCENTAGEOFEARNINGS)",
            "type": "string"
          },
          "amount": {
            "description": "Amount allocated",
            "type": "number"
          },
          "percentage": {
            "description": "Percentage allocated",
            "type": "number"
          },
          "unit": {
            "description": "Unit (HOURS, UNITS)",
            "type": "string"
          },
          "multiple": {
            "description": "Hourly rate multiplier",
            "type": "number"
          },
          "accrue_time_off": {
            "description": "Does PayItem accrue Time Off",
            "type": "boolean"
          },
          "supplemental": {
            "description": "Supplemental",
            "type": "boolean"
          },
          "max_amount": {
            "description": "Maximum accrued amount",
            "type": "number"
          },
          "paid_leave": {
            "description": "Is a Paid Time Off type",
            "type": "boolean"
          },
          "show_pay_slip": {
            "description": "Is showed on Pay Slip",
            "type": "boolean"
          },
          "normal_entitlement": {
            "description": "Default entitlement amount",
            "type": "number"
          },
          "loading_rate": {
            "description": "Default percentage amount",
            "type": "number"
          },
          "expense_account_id": {
            "description": "Expense Account reference",
            "type": "string"
          },
          "liability_account_id": {
            "description": "Liability Account reference",
            "type": "string"
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    },
    "pay_stub": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "type": "object",
      "properties": {
        "people": {
          "type": "array",
          "items": {
            "type": "object",
            "uniq": [
              "id",
              "code"
            ],
            "properties": {
              "resource_type": {
                "description": "Resource type name",
                "type": "string",
                "readOnly": true
              },
              "id": {
                "description": "PayStub UUID",
                "type": "string",
                "readOnly": true
              },
              "channel_id": {
                "type": "string",
                "description": "Channel ID (org-xxx)",
                "readOnly": true
              },
              "group_id": {
                "description": "Group ID (cld-xxx)",
                "type": "string",
                "readOnly": true
              },
              "created_at": {
                "description": "Object creation timestamp",
                "type": "string",
                "format": "date-time",
                "readOnly": true
              },
              "updated_at": {
                "description": "Object last update timestamp",
                "type": "string",
                "format": "date-time",
                "readOnly": true
              },
              "code": {
                "description": "Code, auto-generated if not specified",
                "type": "string"
              },
              "status": {
                "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
                "type": "string",
                "format": "enum"
              },
              "pay_run_id": {
                "description": "Pay Run reference",
                "type": "string"
              },
              "employee_id": {
                "description": "Employee reference",
                "type": "string"
              },
              "total_earnings": {
                "description": "Total of PayStub of type Earnings",
                "type": "number"
              },
              "total_deductions": {
                "description": "Total of PayStub of type Deductions",
                "type": "number"
              },
              "total_reimbursement": {
                "description": "Total of PayStub of type Reimbursement",
                "type": "number"
              },
              "tax": {
                "description": "Total of PayStub of type Tax",
                "type": "number"
              },
              "net_pay": {
                "description": "Total of PayStub",
                "type": "number"
              },
              "pay_stub_items": {
                "description": "PayStubItems detail",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "PayStubItem ID",
                      "type": "string"
                    },
                    "status": {
                      "description": "PayStubItem (ACTIVE or INACTIVE)",
                      "type": "string"
                    },
                    "type": {
                      "description": "PayStubItem type",
                      "type": "string"
                    },
                    "name": {
                      "description": "PayStubItem name",
                      "type": "string"
                    },
                    "description": {
                      "description": "PayStubItem description",
                      "type": "string"
                    },
                    "pay_item_id": {
                      "description": "Pay Item reference",
                      "type": "string"
                    },
                    "units": {
                      "description": "Units allocated",
                      "type": "number"
                    },
                    "amount": {
                      "description": "Amount allocated",
                      "type": "number"
                    },
                    "hours": {
                      "description": "Hours allocated",
                      "type": "number"
                    },
                    "balance": {
                      "description": "Balance allocated",
                      "type": "number"
                    },
                    "percentage": {
                      "description": "Percentage allocated",
                      "type": "number"
                    },
                    "rate_per_unit": {
                      "description": "Rate per unit",
                      "type": "string"
                    },
                    "type_of_units": {
                      "description": "Type on units allocated (HOURS, UNITS)",
                      "type": "string"
                    },
                    "calculation_type": {
                      "description": "(FIXEDAMOUNT, PERCENTAGEOFEARNINGS, UNIT)",
                      "type": "string"
                    },
                    "contribution_type": {
                      "description": "(SGC, SALARYSACRIFICE)",
                      "type": "string"
                    },
                    "tax_type": {
                      "description": "(PAYG Tax, ...)",
                      "type": "string"
                    },
                    "currency": {
                      "description": "Currency",
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "definitions": {
        "contact_channel": {
          "$schema": "http://json-schema.org/draft-04/schema#",
          "definitions": {
            "contact_channel": {
              "type": "object",
              "properties": {
                "skype": {
                  "description": "Skype account",
                  "type": "string"
                }
              }
            }
          }
        },
        "email": {
          "$schema": "http://json-schema.org/draft-04/schema#",
          "definitions": {
            "email_group": {
              "type": "object",
              "properties": {
                "address": {
                  "description": "Primary email address",
                  "type": "string"
                },
                "address2": {
                  "description": "Secondary email address",
                  "type": "string"
                }
              }
            }
          }
        },
        "address": {
          "$schema": "http://json-schema.org/draft-04/schema#",
          "definitions": {
            "address": {
              "type": "object",
              "properties": {
                "landline": {
                  "description": "Primary phone number",
                  "type": "string"
                },
                "landline2": {
                  "description": "Secondary phone number",
                  "type": "string"
                },
                "mobile": {
                  "description": "Primary mobile number",
                  "type": "string"
                },
                "mobile2": {
                  "description": "Secondary mobile number",
                  "type": "string"
                },
                "fax": {
                  "description": "Primary fax number",
                  "type": "string"
                },
                "fax2": {
                  "description": "Secondary fax number",
                  "type": "string"
                },
                "pager": {
                  "description": "Primary pager number",
                  "type": "string"
                },
                "pager2": {
                  "description": "Secondary pager number",
                  "type": "string"
                }
              }
            }
          }
        },
        "website": {
          "$schema": "http://json-schema.org/draft-04/schema#",
          "definitions": {
            "email_group": {
              "type": "object",
              "properties": {
                "url": {
                  "description": "Primary website url",
                  "type": "string"
                },
                "url2": {
                  "description": "Secondary website url",
                  "type": "string"
                }
              }
            }
          }
        },
        "phone": {
          "$schema": "http://json-schema.org/draft-04/schema#",
          "definitions": {
            "address": {
              "type": "object",
              "properties": {
                "landline": {
                  "description": "Primary phone number",
                  "type": "string"
                },
                "landline2": {
                  "description": "Secondary phone number",
                  "type": "string"
                },
                "mobile": {
                  "description": "Primary mobile number",
                  "type": "string"
                },
                "mobile2": {
                  "description": "Secondary mobile number",
                  "type": "string"
                },
                "fax": {
                  "description": "Primary fax number",
                  "type": "string"
                },
                "fax2": {
                  "description": "Secondary fax number",
                  "type": "string"
                },
                "pager": {
                  "description": "Primary pager number",
                  "type": "string"
                },
                "pager2": {
                  "description": "Secondary pager number",
                  "type": "string"
                }
              }
            }
          }
        },
        "price": {
          "$schema": "http://json-schema.org/draft-04/schema#",
          "definitions": {
            "price": {
              "type": "object",
              "properties": {
                "total_amount": {
                  "description": "Total amount including taxes",
                  "type": "number"
                },
                "net_amount": {
                  "description": "Net amount excluding taxes",
                  "type": "number"
                },
                "tax_amount": {
                  "description": "Total tax amount",
                  "type": "number"
                },
                "tax_rate": {
                  "description": "Applicable tax rate",
                  "type": "number"
                },
                "currency": {
                  "description": "Price currency (defaults to Company currency)",
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/pay_items

Attributes

Field Type Description
resource_type String Resource type name
id String PayItem UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
name String PayItem name
description String PayItem description
type Enum PayItem type (, BENEFIT, DEDUCTION, REIMBURSEMENT, TIMEOFF, LEAVE, SUPPERANNUATION, TAX, TAXTABLE)
sub_type String (Regular Hours, Overtime Hours, Bonus, Travel Allowance, Health Insurance, Vacation…)
category String (REGULAREARNINGS, OVERTIMEEARNINGS…)
rate_type String (MULTIPLE, BONUS, FIXEDAMOUNT)
calculation_type String (MANUAL, STANDARDPLAN, PERCENTAGEOFEARNINGS)
amount Number Amount allocated
percentage Number Percentage allocated
unit String Unit (HOURS, UNITS)
multiple Number Hourly rate multiplier
accrue_time_off Boolean Does PayItem accrue Time Off
supplemental Boolean Supplemental
max_amount Number Maximum accrued amount
paid_leave Boolean Is a Paid Time Off type
show_pay_slip Boolean Is showed on Pay Slip
normal_entitlement Number Default entitlement amount
loading_rate Number Default percentage amount
expense_account_id String Expense Account reference
liability_account_id String Liability Account reference

PayItem List

GET https://api-connec.maestrano.com/api/v2/:group_id/pay_items
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_items": [
    {
      "id": "55026311-bee9-0132-2f77-56847afe9799",
      "code": "PI001",
      "status": "ACTIVE",
      "name": "Overtime Hours",
      "description": "Overtime for last month",
      "type": "EARNINGS",
      "sub_type": "Overtime Hours",
      "category": "OVERTIMEEARNINGS",
      "calculation_type": "MANUAL",
      "rate_type": "MULTIPLE",
      "amount": 45678,
      "multiple": 1.5,
      "accrue_time_off": false,
      "expense_account_id": "fc0dd2e1-bee7-0132-a8c4-56847afe9799",
      "liability_account_id": "hb0dd2e1-bee7-0132-a8c4-56847afe4562",
      "updated_at": "2015-04-20T06:32:43.000Z",
      "created_at": "2015-04-07T00:16:59.855Z"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pay_items": {
      "id": "pay_items",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "PayItem UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "PayItem unique code",
            "type": "string"
          },
          "name": {
            "description": "PayItem name",
            "type": "string"
          },
          "description": {
            "description": "PayItem description",
            "type": "string"
          },
          "status": {
            "description": "PayItem status",
            "type": "string"
          },
          "type": {
            "description": "PayItem type",
            "enum": [
              "EARNINGS",
              "BENEFIT",
              "DEDUCTION",
              "REIMBURSEMENT",
              "TIMEOFF",
              "LEAVE"
            ]
          },
          "sub_type": {
            "description": "PayItem sub type (Regular Hours, Overtime Hours, Bonus, Travel Allowance, Health Insurance, Vacation)",
            "type": "string"
          },
          "category": {
            "description": "PayItem category",
            "enum": [
              "REGULAREARNINGS",
              "OVERTIMEEARNINGS"
            ]
          },
          "rate_type": {
            "description": "PayItem rate type",
            "enum": [
              "MULTIPLE",
              "BONUS",
              "FIXEDAMOUNT"
            ]
          },
          "calculation_type": {
            "description": "PayItem calculation type",
            "enum": [
              "MANUAL",
              "STANDARDPLAN",
              "PERCENTAGEOFEARNINGS"
            ]
          },
          "amount": {
            "description": "PayItem amount if amount based",
            "type": "number"
          },
          "percentage": {
            "description": "PayItem percentage if prorata based",
            "type": "number"
          },
          "unit": {
            "description": "PayItem unit",
            "type": "string"
          },
          "multiple": {
            "description": "PayItem multiplier (for overtime hours for instance)",
            "type": "number"
          },
          "accrue_time_off": {
            "description": "This Pay Item allows the accrual of time-off",
            "type": "boolean"
          },
          "expense_account_id": {
            "description": "Reference of the Account used for this Pay Item expenses",
            "type": "string"
          }
        }
      }
    }
  }
}

Get PayItem
GET/api/v2/:group_id/pay_items

Get the list of PayItems.

Attributes

Field Type Description
id String Pay item UUID
group_id String Group ID
created_at Date-time Pay item creation date
updated_at Date-time Pay item last update date
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
name String Pay item name
description String Pay item description
type Enum [EARNINGS, BENEFIT, DEDUCTION, REIMBURSEMENT, TIMEOFF, LEAVE, SUPPERANNUATION, TAX, TAXTABLE]
sub_type String PayItem sub type (Regular Hours, Overtime Hours, Bonus, Travel Allowance, Health Insurance, Vacation, …)
category Enum [REGULAREARNINGS, OVERTIMEEARNINGS]
rate_type Enum [MULTIPLE, BONUS, FIXEDAMOUNT]
calculation_type Enum [MANUAL, STANDARDPLAN, PERCENTAGEOFEARNINGS]
amount Number PayItem amount if amount based
percentage Number PayItem percentage if prorata based
multiple Number PayItem multiplier (for overtime hours for instance)
unit String PayItem unit [Hours, Fixed Amount]
paid_leave Boolean Will the employee be paid when taking this type of leave
show_pay_slip Boolean Will the balance be shown on the employee pay slip
accrue_time_off Boolean Indicates that this earnings rate should accrue leave
supplemental Boolean Is the pay item supplemental (i.e. bonuses, commissions, overtime pay, accumulated sick leave, etc.)
expense_account_id Reference Account used for this pay item expense
liability_account_id Reference Account used for this pay item liability
normal_entitlement Number The number of units the employee is entitled to each year
loading_rate Number percentage your organisation pays on top of ordinary earnings when an employee take leave

POST https://api-connec.maestrano.com/api/v2/:group_id/pay_items
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "pay_items": {
        "name": "Annual Leaves",
        "type": "EARNINGS",
        "sub_type": "Regular Hours"
        "rate_type": "FIXEDAMOUNT",
        "percentage": 0.2
        "unit": "HOURS"
    }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
    "pay_items": {
        "id": "e32303c1-5102-0132-661e-600308937d74",
        "group_id": "cld-4d7f86",
        "created_at": "2014-12-18T03:42:45Z",
        "updated_at": "2014-12-18T03:42:45Z",
        "code": "PI37",
        "name": "Annual Leaves",
        "type": "EARNINGS",
        "sub_type": "Regular Hours"
        "rate_type": "FIXEDAMOUNT",
        "percentage": 0.2
        "unit": "HOURS"
    }
}

Create New PayItem
POST/api/v2/:group_id/pay_items

Create a new PayItem.


PayItem

GET https://api-connec.maestrano.com/api/v2/:group_id/pay_items/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
    "pay_items": {
        "id": "3f58a011-5102-0132-65ff-600308937d74",
        "group_id": "cld-f4g8r2g",
        "created_at": "2014-11-18T03:38:13Z",
        "updated_at": "2014-11-18T03:38:13Z",
        "code": "PI37",
        "name": "Annual Leaves",
        "type": "EARNINGS",
        "sub_type": Regular Hours,
        "category": "FIXEDAMOUNT"
    }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get PayItem
GET/api/v2/:group_id/pay_items/{id}

Get a single PayItem.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The pay_item ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/pay_items/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_items": {
    "name": "Annual Leaves"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
    "pay_items": {
        "id": "3f58a011-5102-0132-65ff-600308937d74",
        "group_id": "cld-f4g8r2g",
        "created_at": "2014-11-18T03:38:13Z",
        "updated_at": "2014-11-18T03:38:13Z",
        "code": "PI37",
        "name": "Annual Leaves",
        "type": "EARNINGS",
        "sub_type": Regular Hours,
        "category": "FIXEDAMOUNT"
    }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an PayItem
PUT/api/v2/:group_id/pay_items/{id}

Update a single PayItem

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The pay_item ID


Pay Runs

A PayRun groups all the employees pay_stubs for a PaySchedule.

Business Rules

code must be unique if specified, otherwise is auto-generated

PayRuns JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/pay_runs
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "people": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "PayRun UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
            "type": "string",
            "format": "enum"
          },
          "pay_schedule_id": {
            "description": "Pay Schedule reference",
            "type": "string"
          },
          "start_date": {
            "description": "Pay Run start date",
            "type": "string",
            "format": "date-time"
          },
          "end_date": {
            "description": "Pay Run end date",
            "type": "string",
            "format": "date-time"
          },
          "payment_date": {
            "description": "Pay Run payment date",
            "type": "string",
            "format": "date-time"
          },
          "total_earnings": {
            "description": "Total of PayRun of type Earnings",
            "type": "number"
          },
          "total_deductions": {
            "description": "Total of PayRun of type Deductions",
            "type": "number"
          },
          "total_reimbursement": {
            "description": "Total of PayRun of type Reimbursement",
            "type": "number"
          },
          "tax": {
            "description": "Total of PayRun of type Tax",
            "type": "number"
          },
          "net_pay": {
            "description": "Total of PayRun",
            "type": "number"
          },
          "pay_stub_items": {
            "description": "PayStubItems detail",
            "type": "array",
            "items": {
              "description": "PayStub detail",
              "$ref": "#/definitions/pay_stub"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    },
    "pay_stub": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "type": "object",
      "properties": {
        "people": {
          "type": "array",
          "items": {
            "type": "object",
            "uniq": [
              "id",
              "code"
            ],
            "properties": {
              "resource_type": {
                "description": "Resource type name",
                "type": "string",
                "readOnly": true
              },
              "id": {
                "description": "PayStub UUID",
                "type": "string",
                "readOnly": true
              },
              "channel_id": {
                "type": "string",
                "description": "Channel ID (org-xxx)",
                "readOnly": true
              },
              "group_id": {
                "description": "Group ID (cld-xxx)",
                "type": "string",
                "readOnly": true
              },
              "created_at": {
                "description": "Object creation timestamp",
                "type": "string",
                "format": "date-time",
                "readOnly": true
              },
              "updated_at": {
                "description": "Object last update timestamp",
                "type": "string",
                "format": "date-time",
                "readOnly": true
              },
              "code": {
                "description": "Code, auto-generated if not specified",
                "type": "string"
              },
              "status": {
                "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
                "type": "string",
                "format": "enum"
              },
              "pay_run_id": {
                "description": "Pay Run reference",
                "type": "string"
              },
              "employee_id": {
                "description": "Employee reference",
                "type": "string"
              },
              "total_earnings": {
                "description": "Total of PayStub of type Earnings",
                "type": "number"
              },
              "total_deductions": {
                "description": "Total of PayStub of type Deductions",
                "type": "number"
              },
              "total_reimbursement": {
                "description": "Total of PayStub of type Reimbursement",
                "type": "number"
              },
              "tax": {
                "description": "Total of PayStub of type Tax",
                "type": "number"
              },
              "net_pay": {
                "description": "Total of PayStub",
                "type": "number"
              },
              "pay_stub_items": {
                "description": "PayStubItems detail",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "PayStubItem ID",
                      "type": "string"
                    },
                    "status": {
                      "description": "PayStubItem (ACTIVE or INACTIVE)",
                      "type": "string"
                    },
                    "type": {
                      "description": "PayStubItem type",
                      "type": "string"
                    },
                    "name": {
                      "description": "PayStubItem name",
                      "type": "string"
                    },
                    "description": {
                      "description": "PayStubItem description",
                      "type": "string"
                    },
                    "pay_item_id": {
                      "description": "Pay Item reference",
                      "type": "string"
                    },
                    "units": {
                      "description": "Units allocated",
                      "type": "number"
                    },
                    "amount": {
                      "description": "Amount allocated",
                      "type": "number"
                    },
                    "hours": {
                      "description": "Hours allocated",
                      "type": "number"
                    },
                    "balance": {
                      "description": "Balance allocated",
                      "type": "number"
                    },
                    "percentage": {
                      "description": "Percentage allocated",
                      "type": "number"
                    },
                    "rate_per_unit": {
                      "description": "Rate per unit",
                      "type": "string"
                    },
                    "type_of_units": {
                      "description": "Type on units allocated (HOURS, UNITS)",
                      "type": "string"
                    },
                    "calculation_type": {
                      "description": "(FIXEDAMOUNT, PERCENTAGEOFEARNINGS, UNIT)",
                      "type": "string"
                    },
                    "contribution_type": {
                      "description": "(SGC, SALARYSACRIFICE)",
                      "type": "string"
                    },
                    "tax_type": {
                      "description": "(PAYG Tax, ...)",
                      "type": "string"
                    },
                    "currency": {
                      "description": "Currency",
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "definitions": {
        "contact_channel": {
          "$schema": "http://json-schema.org/draft-04/schema#",
          "definitions": {
            "contact_channel": {
              "type": "object",
              "properties": {
                "skype": {
                  "description": "Skype account",
                  "type": "string"
                }
              }
            }
          }
        },
        "email": {
          "$schema": "http://json-schema.org/draft-04/schema#",
          "definitions": {
            "email_group": {
              "type": "object",
              "properties": {
                "address": {
                  "description": "Primary email address",
                  "type": "string"
                },
                "address2": {
                  "description": "Secondary email address",
                  "type": "string"
                }
              }
            }
          }
        },
        "address": {
          "$schema": "http://json-schema.org/draft-04/schema#",
          "definitions": {
            "address": {
              "type": "object",
              "properties": {
                "landline": {
                  "description": "Primary phone number",
                  "type": "string"
                },
                "landline2": {
                  "description": "Secondary phone number",
                  "type": "string"
                },
                "mobile": {
                  "description": "Primary mobile number",
                  "type": "string"
                },
                "mobile2": {
                  "description": "Secondary mobile number",
                  "type": "string"
                },
                "fax": {
                  "description": "Primary fax number",
                  "type": "string"
                },
                "fax2": {
                  "description": "Secondary fax number",
                  "type": "string"
                },
                "pager": {
                  "description": "Primary pager number",
                  "type": "string"
                },
                "pager2": {
                  "description": "Secondary pager number",
                  "type": "string"
                }
              }
            }
          }
        },
        "website": {
          "$schema": "http://json-schema.org/draft-04/schema#",
          "definitions": {
            "email_group": {
              "type": "object",
              "properties": {
                "url": {
                  "description": "Primary website url",
                  "type": "string"
                },
                "url2": {
                  "description": "Secondary website url",
                  "type": "string"
                }
              }
            }
          }
        },
        "phone": {
          "$schema": "http://json-schema.org/draft-04/schema#",
          "definitions": {
            "address": {
              "type": "object",
              "properties": {
                "landline": {
                  "description": "Primary phone number",
                  "type": "string"
                },
                "landline2": {
                  "description": "Secondary phone number",
                  "type": "string"
                },
                "mobile": {
                  "description": "Primary mobile number",
                  "type": "string"
                },
                "mobile2": {
                  "description": "Secondary mobile number",
                  "type": "string"
                },
                "fax": {
                  "description": "Primary fax number",
                  "type": "string"
                },
                "fax2": {
                  "description": "Secondary fax number",
                  "type": "string"
                },
                "pager": {
                  "description": "Primary pager number",
                  "type": "string"
                },
                "pager2": {
                  "description": "Secondary pager number",
                  "type": "string"
                }
              }
            }
          }
        },
        "price": {
          "$schema": "http://json-schema.org/draft-04/schema#",
          "definitions": {
            "price": {
              "type": "object",
              "properties": {
                "total_amount": {
                  "description": "Total amount including taxes",
                  "type": "number"
                },
                "net_amount": {
                  "description": "Net amount excluding taxes",
                  "type": "number"
                },
                "tax_amount": {
                  "description": "Total tax amount",
                  "type": "number"
                },
                "tax_rate": {
                  "description": "Applicable tax rate",
                  "type": "number"
                },
                "currency": {
                  "description": "Price currency (defaults to Company currency)",
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/pay_runs

Attributes

Field Type Description
resource_type String Resource type name
id String PayRun UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
pay_schedule_id String Pay Schedule reference
start_date Date Time Pay Run start date
end_date Date Time Pay Run end date
payment_date Date Time Pay Run payment date
total_earnings Number Total of PayRun of type Earnings
total_deductions Number Total of PayRun of type Deductions
total_reimbursement Number Total of PayRun of type Reimbursement
tax Number Total of PayRun of type Tax
net_pay Number Total of PayRun
pay_stub_items Array PayStubItems detail
PayRuns PayStubItems attributes
Field Type Description

PayRun List

GET https://api-connec.maestrano.com/api/v2/:group_id/pay_runs
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_runs": [
    {
      "id": "3d427911-c086-0132-91ad-22000aac0203",
      "code": "PS423",
      "status": "DRAFT",
      "pay_schedule_id": "2e24b101-c086-0132-9096-22000aac0203",
      "start_date": "2015-05-01T00:00:00Z",
      "end_date": "2015-05-15T00:00:00Z",
      "payment_date": "2015-05-18T00:00:00Z",
      "total_earnings": 4583.33,
      "total_deductions": 317.92,
      "total_reimbursement": 0,
      "tax": 696.21,
      "net_pay": 3569.2,
      "pay_stubs": [
        {
          "id": "3d484571-c086-0132-91b1-22000aac0203",
          "status": "ACTIVE",
          "pay_run_id": "3d427911-c086-0132-91ad-22000aac0203",
          "employee_id": "3490ac61-c086-0132-90f8-22000aac0203",
          "tax": 402.57,
          "net_pay": 1924.93,
          "pay_stub_items": [
            {
              "id": "5525d6bcbf3c57b1c600e13a",
              "status": "ACTIVE",
              "pay_item_id": "2f411d81-c086-0132-909e-22000aac0203",
              "units": 72,
              "rate_per_unit": "31.25"
            },
            {
              "id": "5525d6bcbf3c57b1c600e13d",
              "status": "ACTIVE",
              "pay_item_id": "2f411d81-c086-0132-909e-22000aac0203",
              "units": 8,
              "rate_per_unit": "31.25"
            },
            {
              "id": "5525d6bcbf3c57b1c600e13f",
              "status": "ACTIVE",
              "pay_item_id": "2f73ed51-c086-0132-90b9-22000aac0203",
              "amount": 100,
              "calculation_type": "FIXEDAMOUNT"
            },
            {
              "id": "5525d6bcbf3c57b1c600e141",
              "status": "ACTIVE",
              "pay_item_id": "2f6ce871-c086-0132-90b4-22000aac0203",
              "amount": 72.5,
              "calculation_type": "FIXEDAMOUNT"
            },
            {
              "id": "5525d6bcbf3c57b1c600e143",
              "status": "ACTIVE",
              "pay_item_id": "2f64d221-c086-0132-90b0-22000aac0203",
              "amount": 150
            },
            {
              "id": "5525d6bcbf3c57b1c600e144",
              "status": "ACTIVE",
              "pay_item_id": "2fb0a831-c086-0132-90de-22000aac0203",
              "hours": 3.33,
              "balance": 14
            }
          ]
        },
        {
          "id": "3d4d2771-c086-0132-91b5-22000aac0203",
          "status": "ACTIVE",
          "pay_run_id": "3d427911-c086-0132-91ad-22000aac0203",
          "employee_id": "37113cc1-c086-0132-9110-22000aac0203",
          "tax": 293.64,
          "net_pay": 1644.27,
          "pay_stub_items": [
            {
              "id": "5525d6bebf3c57b1c600e153",
              "status": "ACTIVE",
              "pay_item_id": "2f411d81-c086-0132-909e-22000aac0203",
              "units": 80,
              "rate_per_unit": "26.041667"
            },
            {
              "id": "5525d6bebf3c57b1c600e156",
              "status": "ACTIVE",
              "pay_item_id": "2f73ed51-c086-0132-90b9-22000aac0203",
              "amount": 104.17,
              "calculation_type": "PERCENTAGEOFGROSS"
            },
            {
              "id": "5525d6bebf3c57b1c600e158",
              "status": "ACTIVE",
              "pay_item_id": "2f6ce871-c086-0132-90b4-22000aac0203",
              "amount": 41.25,
              "calculation_type": "FIXEDAMOUNT"
            },
            {
              "id": "5525d6bebf3c57b1c600e15a",
              "status": "ACTIVE",
              "pay_item_id": "2f64d221-c086-0132-90b0-22000aac0203",
              "amount": 75
            },
            {
              "id": "5525d6bebf3c57b1c600e15b",
              "status": "ACTIVE",
              "pay_item_id": "2fb0a831-c086-0132-90de-22000aac0203",
              "hours": 3.33,
              "balance": 16.66
            }
          ]
        }
      ],
      "updated_at": "2015-04-22T03:20:26.000Z",
      "created_at": "2015-04-09T01:32:42.238Z"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",

  "type": "object",
  "properties": {
    "pay_runs": {
      "id": "pay_runs",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "PayRun UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "PayRun unique code",
            "type": "string"
          },
          "status": {
            "description": "PayRun status",
            "enum": ["DRAFT", "APPROVED", "INACTIVE"]
          },
          "pay_schedule_id": {
            "description": "The PaySchedule reference",
            "type": "string"
          },
          "start_date": {
            "description": "PayRun start date",
            "type": "date-time"
          },
          "end_date": {
            "description": "PayRun end date",
            "type": "date-time"
          },
          "payment_date": {
            "description": "PaySchedule next payment date",
            "type": "date-time"
          },
          "total_earnings": {
            "description": "PayRun total earnings amount",
            "type": "number"
          },
          "total_deductions": {
            "description": "PayRun total deductions amount",
            "type": "number"
          },
          "total_reimbursement": {
            "description": "PayRun total reimbursement amount",
            "type": "number"
          },
          "tax": {
            "description": "PayRun total taxes amount",
            "type": "number"
          },
          "net_pay": {
            "description": "PayRun total net pay amount",
            "type": "number"
          },
          "pay_stubs": {
            "description": "The list of employee pay stubs included in this pay run",
            "type": "array",
            "items": [
              {
                "$ref": "#/definitions/pay_stub"
              }
            }
          }
        }
      }
    }
  }
}

Get PayRun
GET/api/v2/:group_id/pay_runs

Get the list of pay_runs.

Attributes

Field Type Description
id String Pay run UUID
group_id String Group ID
created_at Date-time Pay run creation date
updated_at Date-time Pay run last update date
code String Code, auto-generated if not specified
status Enum [DRAFT, APPROVED, INACTIVE] - Default: DRAFT
pay_schedule_id Reference The pay schedule
start_date Date-time The pay run start date
end_date Date-time The pay run end date
payment_date Date-time The pay run next payment date
total_earnings Number The pay run total earnings amount
total_deductions Number The pay run total deductions amount
total_reimbursement Number The pay run total reimbursement amount
tax Number The pay run total tax amount
net_pay Number The pay run total net amount
pay_stubs Array The list of employee pay stubs included in this pay run. You must include the pay stub id if you want to update it, else a new one will be created.

POST https://api-connec.maestrano.com/api/v2/:group_id/pay_runs
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_runs": {
    "code": "PS423",
    "status": "DRAFT",
    "pay_schedule_id": "2e24b101-c086-0132-9096-22000aac0203",
    "start_date": "2015-05-01T00:00:00Z",
    "end_date": "2015-05-15T00:00:00Z",
    "payment_date": "2015-05-18T00:00:00Z"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_runs": {
    "id": "3d427911-c086-0132-91ad-22000aac0203",
    "code": "PS423",
    "status": "DRAFT",
    "pay_schedule_id": "2e24b101-c086-0132-9096-22000aac0203",
    "start_date": "2015-05-01T00:00:00Z",
    "end_date": "2015-05-15T00:00:00Z",
    "payment_date": "2015-05-18T00:00:00Z",
    "updated_at": "2015-04-22T03:20:26.000Z",
    "created_at": "2015-04-09T01:32:42.238Z"
  }
}

Create New PayRun
POST/api/v2/:group_id/pay_runs

Create a new PayRun.


PayRun

GET https://api-connec.maestrano.com/api/v2/:group_id/pay_runs/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_runs": {
    "id": "3d427911-c086-0132-91ad-22000aac0203",
    "code": "PS423",
    "status": "DRAFT",
    "pay_schedule_id": "2e24b101-c086-0132-9096-22000aac0203",
    "start_date": "2015-05-01T00:00:00Z",
    "end_date": "2015-05-15T00:00:00Z",
    "payment_date": "2015-05-18T00:00:00Z",
    "updated_at": "2015-04-22T03:20:26.000Z",
    "created_at": "2015-04-09T01:32:42.238Z"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get PayRun
GET/api/v2/:group_id/pay_runs/{id}

Get a single PayRun.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The pay_run ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/pay_runs/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_runs": {
    "status": "APPROVED"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_runs": {
    "id": "3d427911-c086-0132-91ad-22000aac0203",
    "code": "PS423",
    "status": "DRAFT",
    "pay_schedule_id": "2e24b101-c086-0132-9096-22000aac0203",
    "start_date": "2015-05-01T00:00:00Z",
    "end_date": "2015-05-15T00:00:00Z",
    "payment_date": "2015-05-18T00:00:00Z",
    "updated_at": "2015-04-22T03:20:26.000Z",
    "created_at": "2015-04-09T01:32:42.238Z"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an PayRun
PUT/api/v2/:group_id/pay_runs/{id}

Update a single PayRun

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The pay_run ID


Pay Schedules

A PaySchedule represents a pay period employees are associated to.

PaySchedules JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/pay_schedules
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "people": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "PaySchedule UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "name": {
            "description": "Pay Schedule name",
            "type": "string"
          },
          "description": {
            "description": "Pay Schedule description",
            "type": "string"
          },
          "payment_date": {
            "description": "Pay Schedule next payment date",
            "type": "string",
            "format": "date-time"
          },
          "start_date": {
            "description": "Pay Schedule start date",
            "type": "string",
            "format": "date-time"
          },
          "schedule_type": {
            "description": "[WEEKLY, MONTHLY, BIWEEKLY, QUARTERLY, SEMIMONTHLY, FOURWEEKLY, YEARLY]",
            "type": "string",
            "format": "enum"
          },
          "first_week_day": {
            "description": "For weekly pay schedules (0: Sunday, 1: Monday, ...)",
            "type": "number"
          },
          "transaction_week_day": {
            "description": "For weekly pay schedules (0: Sunday, 1: Monday, ...)",
            "type": "number"
          },
          "shift_assigned_day": {
            "description": "For weekly pay schedules (0: Sunday, 1: Monday, ...)",
            "type": "number"
          },
          "first_month_day": {
            "description": "For monthly pay schedule",
            "type": "number"
          },
          "employees": {
            "description": "Employees references associated to this PaySchedules",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "Employee UUID",
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/pay_schedules

Attributes

Field Type Description
resource_type String Resource type name
id String PaySchedule UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
name String Pay Schedule name
description String Pay Schedule description
payment_date Date Time Pay Schedule next payment date
start_date Date Time Pay Schedule start date
schedule_type Enum [WEEKLY, MONTHLY, BIWEEKLY, QUARTERLY, SEMIMONTHLY, FOURWEEKLY, YEARLY]
first_week_day Number For weekly pay schedules (0: Sunday, 1: Monday, …)
transaction_week_day Number For weekly pay schedules (0: Sunday, 1: Monday, …)
shift_assigned_day Number For weekly pay schedules (0: Sunday, 1: Monday, …)
first_month_day Number For monthly pay schedule
employees Array Employees references associated to this PaySchedules
PaySchedules Employees attributes
Field Type Description
id String Employee UUID

PaySchedule List

GET https://api-connec.maestrano.com/api/v2/:group_id/pay_schedules
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_schedules": [
    {
      "id": "50789531-bee9-0132-2f6a-56847afe9799",
      "name": "Monthly",
      "payment_date": "2015-06-03",
      "start_date": "2015-05-15",
      "schedule_type": "MONTHLY",
      "first_month_day": 1,
      "transaction_month_day": 15,
      "employees": [
        {
          "id": "6f153111-bee9-0132-2fc8-56847afe9799"
        },
        {
          "id": "83f93ea1-bee9-0132-2fe0-56847afe9799"
        }
      ],
      "updated_at": "2015-04-22T03:20:26.000Z",
      "created_at": "2015-04-07T00:16:52.289Z"
    },
    {
      "id": "67789531-bee9-0132-2f6a-56847afe9733",
      "name": "Weekly",
      "payment_date": "2015-05-09",
      "start_date": "2016-04-15",
      "schedule_type": "WEEKLY",
      "first_week_day": 0,
      "transaction_week_day": 1,
      "shift_assigned_day": 0,
      "employees": [
        {
          "id": "3d153111-bee9-0132-2fc8-56847afe9722"
        },
        {
          "id": "11f93ea1-bee9-0132-2fe0-56847afe9744"
        }
      ],
      "updated_at": "2015-04-22T03:20:26.000Z",
      "created_at": "2015-04-07T00:16:52.289Z"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",

  "type": "object",
  "properties": {
    "pay_schedules": {
      "id": "pay_schedules",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "PaySchedule UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "PaySchedule unique code",
            "type": "string"
          },
          "name": {
            "description": "PaySchedule name",
            "type": "string"
          },
          "payment_date": {
            "description": "PaySchedule next payment date",
            "type": "date-time"
          },
          "start_date": {
            "description": "PaySchedule start date",
            "type": "date-time"
          },
          "schedule_type": {
            "description": "PaySchedule type",
            "enum": ["WEEKLY", "MONTHLY", "BIWEEKLY", "QUARTERLY", "SEMIMONTHLY", "FOURWEEKLY", "YEARLY"]
          },
          "first_week_day": {
            "description": "For weekly pay schedules (0: Sunday, 1: Monday, ...)",
            "type": "string"
          },
          "transaction_week_day": {
            "description": "For weekly pay schedules (0: Sunday, 1: Monday, ...)",
            "type": "string"
          },
          "shift_assigned_day": {
            "description": "For weekly pay schedules (0: Sunday, 1: Monday, ...)",
            "type": "string"
          },
          "first_month_day": {
            "description": "For monthly pay schedule",
            "type": "string"
          },
          "transaction_month_day": {
            "description": "For monthly pay schedule",
            "type": "string"
          },
          "employees": {
            "description": "The list of Employees under this Pay Schedule",
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "Reference of the Employee",
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Get PaySchedule
GET/api/v2/:group_id/pay_schedules

Get the list of PaySchedules.

Attributes

Field Type Description
id String Pay schedule UUID
group_id String Group ID
created_at Date-time Pay schedule creation date
updated_at Date-time Pay schedule last update date
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
name String Pay schedule name
description String Pay schedule description
payment_date Date-time Pay next payment date
start_date Date-time Pay start date
schedule_type Enum [WEEKLY, MONTHLY, BIWEEKLY, QUARTERLY, SEMIMONTHLY, FOURWEEKLY, YEARLY]
first_week_day Integer For weekly pay schedules (0: Sunday, 1: Monday, …)
transaction_week_day Integer For weekly pay schedules (0: Sunday, 1: Monday, …)
shift_assigned_day Integer For weekly pay schedules (0: Sunday, 1: Monday, …)
first_month_day Integer For monthly pay schedule
transaction_month_day Integer For monthly pay schedule
employees Array The list of employees under this pay schedule
Pay schedule employees attributes
Field Type Description
id String Employee UUID

POST https://api-connec.maestrano.com/api/v2/:group_id/pay_schedules
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_schedules": {
    "id": "50789531-bee9-0132-2f6a-56847afe9799",
    "name": "Semimonthly pay schedule",
    "payment_date": "2015-06-03",
    "start_date": "2015-05-16",
    "schedule_type": "SEMIMONTHLY",
    "employees": [
      {
        "id": "6f153111-bee9-0132-2fc8-56847afe9799"
      },
      {
        "id": "83f93ea1-bee9-0132-2fe0-56847afe9799"
      }
    ],
    "updated_at": "2015-04-22T03:20:26.000Z",
    "created_at": "2015-04-07T00:16:52.289Z"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_schedules": {
    "id": "50789531-bee9-0132-2f6a-56847afe9799",
    "name": "Semimonthly pay schedule",
    "payment_date": "2015-06-03",
    "start_date": "2015-05-16",
    "schedule_type": "SEMIMONTHLY",
    "employees": [
      {
        "id": "6f153111-bee9-0132-2fc8-56847afe9799"
      },
      {
        "id": "83f93ea1-bee9-0132-2fe0-56847afe9799"
      }
    ],
    "updated_at": "2015-04-22T03:20:26.000Z",
    "created_at": "2015-04-07T00:16:52.289Z"
  }
}

Create New PaySchedule
POST/api/v2/:group_id/pay_schedules

Create a new PaySchedule.


PaySchedule

GET https://api-connec.maestrano.com/api/v2/:group_id/pay_schedules/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_schedules": {
    "id": "50789531-bee9-0132-2f6a-56847afe9799",
    "name": "Semimonthly pay schedule",
    "payment_date": "2015-06-03",
    "start_date": "2015-05-16",
    "schedule_type": "SEMIMONTHLY",
    "employees": [
      {
        "id": "6f153111-bee9-0132-2fc8-56847afe9799"
      },
      {
        "id": "83f93ea1-bee9-0132-2fe0-56847afe9799"
      }
    ],
    "updated_at": "2015-04-22T03:20:26.000Z",
    "created_at": "2015-04-07T00:16:52.289Z"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get PaySchedule
GET/api/v2/:group_id/pay_schedules/{id}

Get a single PaySchedule.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The PaySchedule ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/pay_schedules/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_schedules": {
    "name": "Semimonthly pay schedule"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_schedules": {
    "id": "50789531-bee9-0132-2f6a-56847afe9799",
    "name": "Semimonthly pay schedule",
    "payment_date": "2015-06-03",
    "start_date": "2015-05-16",
    "schedule_type": "SEMIMONTHLY",
    "employees": [
      {
        "id": "6f153111-bee9-0132-2fc8-56847afe9799"
      },
      {
        "id": "83f93ea1-bee9-0132-2fe0-56847afe9799"
      }
    ],
    "updated_at": "2015-04-22T03:20:26.000Z",
    "created_at": "2015-04-07T00:16:52.289Z"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an PaySchedule
PUT/api/v2/:group_id/pay_schedules/{id}

Update a single PaySchedule

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The PaySchedule ID


Pay Stubs

A PayStub groups all the employees pay_stubs for a PaySchedule.

PayStubs JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/pay_stubs
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "people": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "PayStub UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
            "type": "string",
            "format": "enum"
          },
          "pay_run_id": {
            "description": "Pay Run reference",
            "type": "string"
          },
          "employee_id": {
            "description": "Employee reference",
            "type": "string"
          },
          "total_earnings": {
            "description": "Total of PayStub of type Earnings",
            "type": "number"
          },
          "total_deductions": {
            "description": "Total of PayStub of type Deductions",
            "type": "number"
          },
          "total_reimbursement": {
            "description": "Total of PayStub of type Reimbursement",
            "type": "number"
          },
          "tax": {
            "description": "Total of PayStub of type Tax",
            "type": "number"
          },
          "net_pay": {
            "description": "Total of PayStub",
            "type": "number"
          },
          "pay_stub_items": {
            "description": "PayStubItems detail",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "PayStubItem ID",
                  "type": "string"
                },
                "status": {
                  "description": "PayStubItem (ACTIVE or INACTIVE)",
                  "type": "string"
                },
                "type": {
                  "description": "PayStubItem type",
                  "type": "string"
                },
                "name": {
                  "description": "PayStubItem name",
                  "type": "string"
                },
                "description": {
                  "description": "PayStubItem description",
                  "type": "string"
                },
                "pay_item_id": {
                  "description": "Pay Item reference",
                  "type": "string"
                },
                "units": {
                  "description": "Units allocated",
                  "type": "number"
                },
                "amount": {
                  "description": "Amount allocated",
                  "type": "number"
                },
                "hours": {
                  "description": "Hours allocated",
                  "type": "number"
                },
                "balance": {
                  "description": "Balance allocated",
                  "type": "number"
                },
                "percentage": {
                  "description": "Percentage allocated",
                  "type": "number"
                },
                "rate_per_unit": {
                  "description": "Rate per unit",
                  "type": "string"
                },
                "type_of_units": {
                  "description": "Type on units allocated (HOURS, UNITS)",
                  "type": "string"
                },
                "calculation_type": {
                  "description": "(FIXEDAMOUNT, PERCENTAGEOFEARNINGS, UNIT)",
                  "type": "string"
                },
                "contribution_type": {
                  "description": "(SGC, SALARYSACRIFICE)",
                  "type": "string"
                },
                "tax_type": {
                  "description": "(PAYG Tax, ...)",
                  "type": "string"
                },
                "currency": {
                  "description": "Currency",
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/pay_stubs

Attributes

Field Type Description
resource_type String Resource type name
id String PayStub UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
pay_run_id String Pay Run reference
employee_id String Employee reference
total_earnings Number Total of PayStub of type Earnings
total_deductions Number Total of PayStub of type Deductions
total_reimbursement Number Total of PayStub of type Reimbursement
tax Number Total of PayStub of type Tax
net_pay Number Total of PayStub
pay_stub_items Array PayStubItems detail
PayStubs PayStubItems attributes
Field Type Description
id String PayStubItem ID
status String PayStubItem (ACTIVE or INACTIVE)
type String PayStubItem type
name String PayStubItem name
description String PayStubItem description
pay_item_id String Pay Item reference
units Number Units allocated
amount Number Amount allocated
hours Number Hours allocated
balance Number Balance allocated
percentage Number Percentage allocated
rate_per_unit String Rate per unit
type_of_units String Type on units allocated (HOURS, UNITS)
calculation_type String (FIXEDAMOUNT, PERCENTAGEOFEARNINGS, UNIT)
contribution_type String (SGC, SALARYSACRIFICE)
tax_type String (PAYG Tax, …)
currency String Currency

PayStub List

GET https://api-connec.maestrano.com/api/v2/:group_id/pay_stubs
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_stubs": [
    {
      "id": "3d484571-c086-0132-91b1-22000aac0203",
      "code": "PA4418",
      "status": "ACTIVE",
      "pay_run_id": "3d427911-c086-0132-91ad-22000aac0203",
      "employee_id": "3490ac61-c086-0132-90f8-22000aac0203",
      "tax": 402.57,
      "net_pay": 1924.93,
      "total_super": 0,
      "total_deductions": 0,
      "total_reimbursement": 0,
      "total_earnings": 1924.93,
      "pay_stub_items": [
        {
          "id": "5525d6bcbf3c57b1c600e13a",
          "status": "ACTIVE",
          "pay_item_id": "2f411d81-c086-0132-909e-22000aac0203",
          "units": 72,
          "rate_per_unit": "31.25",
          "calculation_type": "UNIT"
        },
        {
          "id": "5525d6bcbf3c57b1c600e13d",
          "status": "ACTIVE",
          "pay_item_id": "2f411d81-c086-0132-909e-22000aac0203",
          "units": 8,
          "rate_per_unit": "31.25",
          "calculation_type": "UNIT"
        },
        {
          "id": "5525d6bcbf3c57b1c600e13f",
          "status": "ACTIVE",
          "pay_item_id": "2f73ed51-c086-0132-90b9-22000aac0203",
          "amount": 100,
          "calculation_type": "FIXEDAMOUNT"
        },
        {
          "id": "5525d6bcbf3c57b1c600e141",
          "status": "ACTIVE",
          "pay_item_id": "2f6ce871-c086-0132-90b4-22000aac0203",
          "amount": 72.5,
          "calculation_type": "FIXEDAMOUNT"
        },
        {
          "id": "5525d6bcbf3c57b1c600e143",
          "status": "ACTIVE",
          "pay_item_id": "2f64d221-c086-0132-90b0-22000aac0203",
          "amount": 150,
          "calculation_type": "FIXEDAMOUNT"
        },
        {
          "id": "5525d6bcbf3c57b1c600e144",
          "status": "ACTIVE",
          "pay_item_id": "2fb0a831-c086-0132-90de-22000aac0203",
          "hours": 3.33,
          "balance": 14
        }
      ],
      "updated_at": "2015-04-22T03:20:26.000Z",
      "created_at": "2015-04-09T01:32:42.238Z"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",

  "type": "object",
  "properties": {
    "pay_stubs": {
      "id": "pay_stubs",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "PayStub UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "PayStub unique code",
            "type": "string"
          },
          "status": {
            "description": "PayStub status",
            "enum": ["ACTIVE", "INACTIVE"]
          },
          "pay_run_id": {
            "description": "The PayRun reference",
            "type": "string"
          },
          "employee_id": {
            "description": "The Employee reference",
            "type": "string"
          },
          "tax": {
            "description": "PayStub total taxes amount",
            "type": "number"
          },
          "net_pay": {
            "description": "PayStub total net pay amount",
            "type": "number"
          },
          "total_earning": {
            "description": "Pay stub total earning amount",
            "type": "number"
          },
          "total_super": {
            "description": "Pay stub total super amount",
            "type": "number"
          },
          "total_deductions": {
            "description": "Pay stub total deductions amount",
            "type": "number"
          },
          "total_reimbursement": {
            "description": "Pay stub total reimbursement amount",
            "type": "number"
          },
          "pay_stub_items": {
            "description": "The list of pay stub items entitled to the emnployee",
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "PayStubItem ID",
                    "type": "string"
                  },
                  "status": {
                    "description": "Salary period type",
                    "enum": ["ACTIVE", "INACTIVE"]
                  },
                  "pay_item_id": {
                    "description": "Reference to the Pay Item",
                    "type": "string"
                  },
                  "units": {
                    "description": "Number of units allocated",
                    "type": "number"
                  },
                  "rate_per_unit": {
                    "description": "Rate per unit (units must be specified)",
                    "type": "number"
                  },
                  "amount": {
                    "description": "Fixed amount allocated",
                    "type": "number"
                  },
                  "calculation_type": {
                    "description": "Set to 'FIXEDAMOUNT' if amount is set",
                    "type": "string"
                  },
                  "hours": {
                    "description": "Number of hours allocated",
                    "type": "number"
                  },
                  "balance": {
                    "description": "Current balance",
                    "type": "number"
                  },
                }
              }
            }
          }
        }
      }
    }
  }
}

Get PayStub
GET/api/v2/:group_id/pay_stubs

Get the list of pay_stubs.

Attributes

Field Type Description
id String Invoice UUID
group_id String Group ID
created_at Date-time Invoice creation date
updated_at Date-time Invoice last update date
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
pay_run_id Reference Pay run this pay stub belong to
employee_id Reference Employee this pay stub belong to
total_earnings Integer Pay stub total earning amount
total_super Integer Pay stub total super amount
total_deductions Integer Pay stub total deductions amount
total_reimbursement Integer Pay stub total reimbursement amount
tax Integer Pay stub tax amount
net_pay Integer Pay stub net pay amount
pay_stub_items Array The list of pay stub items entitled to the emnployee
Pay stub items attributes
Field Type Description
id String Pay stub item id
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
name String Pay stub item name
description String Pay stub item description
pay_item_id Reference Pay item
hours Number Number of hours allocated
balance Number Current balance
amount Number Fixed amount allocated
units Number Number of units allocated
rate_per_unit Number Rate per unit (units must be specified)
currency String Pay stub item currency
calculation_type Enum [FIXEDAMOUNT, PERCENTAGEOFEARNINGS]
contribution_type Enum [SGC, SALARYSACRIFICE]
tax_type Enum [PAYG Tax]

POST https://api-connec.maestrano.com/api/v2/:group_id/pay_stubs
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_stubs": {
    "code": "PA4418",
    "pay_run_id": "3d427911-c086-0132-91ad-22000aac0203",
    "employee_id": "3490ac61-c086-0132-90f8-22000aac0203",
    "tax": 402.57,
    "net_pay": 1924.93,
    "pay_stub_items": [
      {
        "id": "5525d6bcbf3c57b1c600e13a",
        "status": "ACTIVE",
        "pay_item_id": "2f411d81-c086-0132-909e-22000aac0203",
        "units": 72,
        "rate_per_unit": "31.25"
      },
      {
        "id": "5525d6bcbf3c57b1c600e13d",
        "status": "ACTIVE",
        "pay_item_id": "2f411d81-c086-0132-909e-22000aac0203",
        "units": 8,
        "rate_per_unit": "31.25"
      }
    ]
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_stubs": {
    "id": "3d484571-c086-0132-91b1-22000aac0203",
    "code": "PA4418",
    "status": "ACTIVE",
    "pay_run_id": "3d427911-c086-0132-91ad-22000aac0203",
    "employee_id": "3490ac61-c086-0132-90f8-22000aac0203",
    "tax": 402.57,
    "net_pay": 1924.93,
    "pay_stub_items": [
      {
        "id": "5525d6bcbf3c57b1c600e13a",
        "status": "ACTIVE",
        "pay_item_id": "2f411d81-c086-0132-909e-22000aac0203",
        "units": 72,
        "rate_per_unit": "31.25"
      },
      {
        "id": "5525d6bcbf3c57b1c600e13d",
        "status": "ACTIVE",
        "pay_item_id": "2f411d81-c086-0132-909e-22000aac0203",
        "units": 8,
        "rate_per_unit": "31.25"
      }
    ],
    "updated_at": "2015-04-22T03:20:26.000Z",
    "created_at": "2015-04-09T01:32:42.238Z"
  }
}

Create New PayStub
POST/api/v2/:group_id/pay_stubs

Create a new PayStub.


PayStub

GET https://api-connec.maestrano.com/api/v2/:group_id/pay_stubs/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_stubs": {
    "id": "3d484571-c086-0132-91b1-22000aac0203",
    "code": "PA4418",
    "status": "ACTIVE",
    "pay_run_id": "3d427911-c086-0132-91ad-22000aac0203",
    "employee_id": "3490ac61-c086-0132-90f8-22000aac0203",
    "tax": 402.57,
    "net_pay": 1924.93,
    "pay_stub_items": [
      {
        "id": "5525d6bcbf3c57b1c600e13a",
        "status": "ACTIVE",
        "pay_item_id": "2f411d81-c086-0132-909e-22000aac0203",
        "units": 72,
        "rate_per_unit": "31.25"
      },
      {
        "id": "5525d6bcbf3c57b1c600e13d",
        "status": "ACTIVE",
        "pay_item_id": "2f411d81-c086-0132-909e-22000aac0203",
        "units": 8,
        "rate_per_unit": "31.25"
      }
    ],
    "updated_at": "2015-04-22T03:20:26.000Z",
    "created_at": "2015-04-09T01:32:42.238Z"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get PayStub
GET/api/v2/:group_id/pay_stubs/{id}

Get a single PayStub.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The pay_stub ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/pay_stubs/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "pay_stubs": {
        "tax": 755.12,
        "net_pay": 3224.47,
    }

}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "pay_stubs": {
    "id": "3d484571-c086-0132-91b1-22000aac0203",
    "code": "PA4418",
    "status": "ACTIVE",
    "pay_run_id": "3d427911-c086-0132-91ad-22000aac0203",
    "employee_id": "3490ac61-c086-0132-90f8-22000aac0203",
    "tax": 402.57,
    "net_pay": 1924.93,
    "pay_stub_items": [
      {
        "id": "5525d6bcbf3c57b1c600e13a",
        "status": "ACTIVE",
        "pay_item_id": "2f411d81-c086-0132-909e-22000aac0203",
        "units": 72,
        "rate_per_unit": "31.25"
      },
      {
        "id": "5525d6bcbf3c57b1c600e13d",
        "status": "ACTIVE",
        "pay_item_id": "2f411d81-c086-0132-909e-22000aac0203",
        "units": 8,
        "rate_per_unit": "31.25"
      }
    ],
    "updated_at": "2015-04-22T03:20:26.000Z",
    "created_at": "2015-04-09T01:32:42.238Z"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an PayStub
PUT/api/v2/:group_id/pay_stubs/{id}

Update a single PayStub

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The pay_stub ID


People

This endpoint has been deprecated, please use /contacts endpoint instead

A person represents a third party individual usually related to an organization.

Business Rules

  • You can create an Organization on the fly and attach the Person by specifying the attach_to_organization attribute (eg: "attach_to_organization": "John Doe")
{
  "people": {
    "opts": {"attach_to_organization": "John Doe"},
    "first_name": "John",
    "last_name": "Doe"
  }
}
  • If your application handles only people but they have a company_name field or equivalent, you can use the attach_to_organization options which will find or create an organization.

People JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/people
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "people": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Person UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
            "type": "string",
            "format": "enum"
          },
          "title": {
            "description": "Person title (Mr, Mrs, ...)",
            "type": "string"
          },
          "full_name": {
            "description": "Person full name",
            "type": "string"
          },
          "first_name": {
            "description": "Person first name",
            "type": "string"
          },
          "last_name": {
            "description": "Person last name",
            "type": "string"
          },
          "job_title": {
            "description": "Person job title",
            "type": "string"
          },
          "birth_date": {
            "description": "Person date of birth",
            "type": "string",
            "format": "date-time"
          },
          "organization_id": {
            "description": "#Person the person belongs to",
            "type": "string",
            "format": "reference"
          },
          "is_customer": {
            "description": "Person is classified as a Customer",
            "type": "boolean"
          },
          "is_supplier": {
            "description": "Person is classified as a Supplier",
            "type": "boolean"
          },
          "is_lead": {
            "description": "Person is classified as a Lead",
            "type": "boolean"
          },
          "contact_channel": {
            "description": "Channels to join the contact",
            "$ref": "#/definitions/contact_channel"
          },
          "address_work": {
            "description": "Person work address",
            "$ref": "#/definitions/address"
          },
          "address_home": {
            "description": "Person home address",
            "$ref": "#/definitions/address"
          },
          "email": {
            "description": "Person email addresses",
            "$ref": "#/definitions/email"
          },
          "website": {
            "description": "Person websites",
            "$ref": "#/definitions/website"
          },
          "phone_work": {
            "description": "Person work phone and fax numbers",
            "$ref": "#/definitions/phone"
          },
          "phone_home": {
            "description": "Person home phone and fax numbers",
            "$ref": "#/definitions/phone"
          },
          "lead_status": {
            "description": "Lead status as defined in the CRM application",
            "type": "string"
          },
          "lead_source": {
            "description": "Lead origin as defined in the CRM application",
            "type": "string"
          },
          "lead_status_changes": {
            "description": "History track of the lead statuses",
            "type": "array",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "description": "Lead satus",
                  "type": "string"
                },
                "created_at": {
                  "description": "Date of the lead status change",
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "lead_referent_type": {
            "description": "Entity type of the lead’s referent [Person,Organization]",
            "type": "string",
            "format": "enum"
          },
          "lead_referent_id": {
            "description": "Lead’s referent, can be a #Person or an #Organization",
            "type": "string",
            "format": "reference"
          },
          "assignee_type": {
            "description": "Entity type of the lead’s assignee [AppUser, Team]",
            "type": "string",
            "format": "enum"
          },
          "assignee_id": {
            "description": "Lead’s assignee can be an #AppUser or a #Team",
            "type": "string",
            "format": "reference"
          },
          "referred_leads": {
            "description": "#People that have been referred by this customer or lead",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "Lead UUID",
                  "type": "string",
                  "readOnly": true
                },
                "first_name": {
                  "description": "Lead first name",
                  "type": "string"
                },
                "last_name": {
                  "description": "Lead last name",
                  "type": "string"
                },
                "organization_id": {
                  "description": "#Organization the person belongs to",
                  "type": "string",
                  "format": "reference"
                }
              }
            }
          },
          "opportunities": {
            "description": "#Opportunities linked to this customer or lead",
            "type": "array",
            "ref": "#opportunities"
          },
          "notes": {
            "description": "Notes about the person",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "Note id",
                  "type": "string"
                },
                "description": {
                  "description": "Note content",
                  "type": "string"
                },
                "tag": {
                  "description": "Note tag",
                  "type": "string"
                },
                "value": {
                  "description": "Note value",
                  "type": "string"
                }
              }
            }
          },
          "tasks": {
            "description": "#Tasks attached to this person",
            "type": "array",
            "ref": "#tasks"
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/people

Attributes

Field Type Description
resource_type String Resource type name
id String Person UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
title String Person title (Mr, Mrs, …)
full_name String Person full name
first_name String Person first name
last_name String Person last name
job_title String Person job title
birth_date Date Time Person date of birth
organization_id Reference Person the person belongs to
is_customer Boolean Person is classified as a Customer
is_supplier Boolean Person is classified as a Supplier
is_lead Boolean Person is classified as a Lead
contact_channel Contact Channel Channels to join the contact
address_work Address Person work address
address_home Address Person home address
email Email Person email addresses
website Website Person websites
phone_work Phone Person work phone and fax numbers
phone_home Phone Person home phone and fax numbers
lead_status String Lead status as defined in the CRM application
lead_source String Lead origin as defined in the CRM application
lead_referent_type Enum Entity type of the lead’s referent [Person,Organization]
lead_referent_id Reference Lead’s referent, can be a Person or an Organization
assignee_type Enum Entity type of the lead’s assignee [AppUser, Team]
assignee_id Reference Lead’s assignee can be an AppUser or a Team
opportunities Array Opportunities linked to this customer or lead
tasks Array Tasks attached to this person
lead_status_changes Array History track of the lead statuses
referred_leads Array People that have been referred by this customer or lead
notes Array Notes about the person
People LeadStatusChanges attributes
Field Type Description
status String Lead satus
created_at Date Time Date of the lead status change
People ReferredLeads attributes
Field Type Description
id String Lead UUID
first_name String Lead first name
last_name String Lead last name
organization_id Reference Organization the person belongs to
People Notes attributes
Field Type Description
id String Note id
description String Note content
tag String Note tag
value String Note value

People List

GET https://api-connec.maestrano.com/api/v2/:group_id/people
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "people": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "group_id": "cld-f4g8r2g",
      "code": "PE7",
      "status": "ACTIVE",
      "title": "Mr",
      "first_name": "John",
      "last_name": "Doe",
      "job_title": "Sales Manager",
      "birth_date": "1986-04-02T00:00:00Z",
      "organization_id": "66731af1-e746-0133-b179-7caa147a84c2",
      "is_customer": true,
      "is_supplier": true,
      "is_lead": true,
      "contact_channel": {
        "skype": "doecorp"
      },
      "address_work": {
        "billing": {
          "line1": "86 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2086",
          "country": "Australia"
        },
        "billing2": {
          "line1": "87 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2087",
          "country": "Australia"
        },
        "shipping": {
          "line1": "88 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2088",
          "country": "Australia"
        },
        "shipping2": {
          "line1": "89 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2089",
          "country": "Australia"
        }
      },
      "address_home": {
        "billing": {
          "line1": "90 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2090",
          "country": "Australia"
        },
        "billing2": {
          "line1": "91 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2091",
          "country": "Australia"
        },
        "shipping": {
          "line1": "92 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2092",
          "country": "Australia"
        },
        "shipping2": {
          "line1": "93 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2093",
          "country": "Australia"
        }
      },
      "email": {
        "address": "john17@maestrano.com",
        "address2": "jack17@example.com"
      },
      "website": {
        "url": "www.website17.com",
        "url2": "www.mywebsite17.com"
      },
      "phone_work": {
        "landline": "+61 2 8574 1222",
        "landline2": "+1 2 8574 1222",
        "mobile": "+61 449 785 122",
        "mobile2": "+1 449 785 122",
        "fax": "+61 2 9974 1222",
        "fax2": "+1 2 9974 1222",
        "pager": "+61 440 785 122",
        "pager2": "+1 440 785 122"
      },
      "phone_home": {
        "landline": "+61 2 8574 1223",
        "landline2": "+1 2 8574 1223",
        "mobile": "+61 449 785 123",
        "mobile2": "+1 449 785 123",
        "fax": "+61 2 9974 1223",
        "fax2": "+1 2 9974 1223",
        "pager": "+61 440 785 123",
        "pager2": "+1 440 785 123"
      },
      "lead_status": "Hot",
      "lead_source": "Cold call",
      "lead_status_changes": [
        {
          "status": "Hot",
          "created_at": "2016-05-24T04:24:08Z"
        }
      ],
      "lead_referent_type": "Entity::Person",
      "lead_referent_id": "48427741-0395-0134-53b9-5969c36333f5",
      "assignee_type": "AppUser",
      "assignee_id": "1ed17491-e9b1-0133-9582-0d535fd9d9bb",
      "referred_leads": [
        {
          "id": "48427741-0395-0134-53b9-5969c36333f5",
          "first_name": "John",
          "last_name": "Doe",
          "organization_id": "66731af1-e746-0133-b179-7caa147a84c2"
        }
      ],
      "opportunities": [
        {
          "id": "15a7c661-fec6-0133-bfc8-5fbf8265841f",
          "code": "POT1",
          "name": "A opportunity name",
          "lead_id": "48427741-0395-0134-53b9-5969c36333f5",
          "description": "Context still needs to be clarified with the customer",
          "sales_stage": "Qualified",
          "type": "New Business",
          "expected_close_date": "2016-03-28T07:12:51Z",
          "amount": {
            "total_amount": 1080
          },
          "probability": 10,
          "next_step": "Qualification",
          "sales_stage_changes": [
            {
              "status": "Open",
              "created_at": "2016-05-18T01:30:53Z"
            },
            {
              "status": "Qualified",
              "created_at": "2016-05-18T01:35:58Z"
            }
          ],
          "assignee_type": "AppUser",
          "assignee_id": "b5dbd78a-26da-4e55-ad84-625b25d67622",
          "created_at": "2016-05-18T01:30:53Z",
          "updated_at": "2016-05-24T04:28:18Z"
        }
      ],
      "notes": [
        {
          "id": "546abf25ebe39067cb0000ce",
          "description": "Something to be aware of!",
          "tag": "123",
          "value": "456"
        }
      ],
      "tasks": [
        {
          "id": "ff6e5211-0393-0134-5392-5969c36333f5",
          "code": "TA1",
          "dependencies": [],
          "time_logs": [],
          "assignees": [],
          "created_at": "2016-05-24T04:15:01Z",
          "updated_at": "2016-05-24T04:28:38Z"
        }
      ],
      "created_at": "2016-05-24T04:24:08Z",
      "updated_at": "2016-05-24T04:29:14Z",
      "channel_id": "org-fbbw",
      "resource_type": "people"
    }
  ]
}

Get People
GET/api/v2/:group_id/people

Get the list of people.


POST https://api-connec.maestrano.com/api/v2/:group_id/people
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "people": {
    "first_name": "John",
    "last_name": "Doe",
    "organization_id": "3f58c721-5102-0132-6600-600308937d74"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "people": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "first_name": "John",
    "last_name": "Doe",
    "organization_id": "3f58c721-5102-0132-6600-600308937d74"
  }
}

Create New Person
POST/api/v2/:group_id/people

Create a new person.


Person

GET https://api-connec.maestrano.com/api/v2/:group_id/people/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "people": {
    "id": "48427741-0395-0134-53b9-5969c36333f5",
    "group_id": "cld-f4g8r2g",
    "code": "PE7",
    "status": "ACTIVE",
    "title": "Mr",
    "first_name": "John",
    "last_name": "Doe",
    "job_title": "Sales Manager",
    "birth_date": "1986-04-02T00:00:00Z",
    "organization_id": "66731af1-e746-0133-b179-7caa147a84c2",
    "is_customer": true,
    "is_supplier": true,
    "is_lead": true,
    "contact_channel": {
      "skype": "doecorp"
    },
    "address_work": {
      "billing": {
        "line1": "86 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2086",
        "country": "Australia"
      },
      "billing2": {
        "line1": "87 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2087",
        "country": "Australia"
      },
      "shipping": {
        "line1": "88 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2088",
        "country": "Australia"
      },
      "shipping2": {
        "line1": "89 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2089",
        "country": "Australia"
      }
    },
    "address_home": {
      "billing": {
        "line1": "90 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2090",
        "country": "Australia"
      },
      "billing2": {
        "line1": "91 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2091",
        "country": "Australia"
      },
      "shipping": {
        "line1": "92 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2092",
        "country": "Australia"
      },
      "shipping2": {
        "line1": "93 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2093",
        "country": "Australia"
      }
    },
    "email": {
      "address": "john17@maestrano.com",
      "address2": "jack17@example.com"
    },
    "website": {
      "url": "www.website17.com",
      "url2": "www.mywebsite17.com"
    },
    "phone_work": {
      "landline": "+61 2 8574 1222",
      "landline2": "+1 2 8574 1222",
      "mobile": "+61 449 785 122",
      "mobile2": "+1 449 785 122",
      "fax": "+61 2 9974 1222",
      "fax2": "+1 2 9974 1222",
      "pager": "+61 440 785 122",
      "pager2": "+1 440 785 122"
    },
    "phone_home": {
      "landline": "+61 2 8574 1223",
      "landline2": "+1 2 8574 1223",
      "mobile": "+61 449 785 123",
      "mobile2": "+1 449 785 123",
      "fax": "+61 2 9974 1223",
      "fax2": "+1 2 9974 1223",
      "pager": "+61 440 785 123",
      "pager2": "+1 440 785 123"
    },
    "lead_status": "Hot",
    "lead_source": "Cold call",
    "lead_status_changes": [
      {
        "status": "Hot",
        "created_at": "2016-05-24T04:24:08Z"
      }
    ],
    "lead_referent_type": "Entity::Person",
    "lead_referent_id": "48427741-0395-0134-53b9-5969c36333f5",
    "assignee_type": "AppUser",
    "assignee_id": "1ed17491-e9b1-0133-9582-0d535fd9d9bb",
    "referred_leads": [
      {
        "id": "48427741-0395-0134-53b9-5969c36333f5",
        "first_name": "John",
        "last_name": "Doe",
        "organization_id": "66731af1-e746-0133-b179-7caa147a84c2"
      }
    ],
    "opportunities": [
      {
        "id": "15a7c661-fec6-0133-bfc8-5fbf8265841f",
        "code": "POT1",
        "name": "A opportunity name",
        "lead_id": "48427741-0395-0134-53b9-5969c36333f5",
        "description": "Context still needs to be clarified with the customer",
        "sales_stage": "Qualified",
        "type": "New Business",
        "expected_close_date": "2016-03-28T07:12:51Z",
        "amount": {
          "total_amount": 1080
        },
        "probability": 10,
        "next_step": "Qualification",
        "sales_stage_changes": [
          {
            "status": "Open",
            "created_at": "2016-05-18T01:30:53Z"
          },
          {
            "status": "Qualified",
            "created_at": "2016-05-18T01:35:58Z"
          }
        ],
        "assignee_type": "AppUser",
        "assignee_id": "b5dbd78a-26da-4e55-ad84-625b25d67622",
        "created_at": "2016-05-18T01:30:53Z",
        "updated_at": "2016-05-24T04:28:18Z"
      }
    ],
    "notes": [
      {
        "id": "546abf25ebe39067cb0000ce",
        "description": "Something to be aware of!",
        "tag": "123",
        "value": "456"
      }
    ],
    "tasks": [
      {
        "id": "ff6e5211-0393-0134-5392-5969c36333f5",
        "code": "TA1",
        "dependencies": [],
        "time_logs": [],
        "assignees": [],
        "created_at": "2016-05-24T04:15:01Z",
        "updated_at": "2016-05-24T04:28:38Z"
      }
    ],
    "created_at": "2016-05-24T04:24:08Z",
    "updated_at": "2016-05-24T04:29:14Z",
    "channel_id": "org-fbbw",
    "resource_type": "people"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Person
GET/api/v2/:group_id/people/{id}

Get a single person.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The person ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/people/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "people": {
    "first_name": "John",
    "last_name": "Doe"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "people": {
    "id": "48427741-0395-0134-53b9-5969c36333f5",
    "group_id": "cld-f4g8r2g",
    "code": "PE7",
    "status": "ACTIVE",
    "title": "Mr",
    "first_name": "John",
    "last_name": "Doe",
    "job_title": "Sales Manager",
    "birth_date": "1986-04-02T00:00:00Z",
    "organization_id": "66731af1-e746-0133-b179-7caa147a84c2",
    "is_customer": true,
    "is_supplier": true,
    "is_lead": true,
    "contact_channel": {
      "skype": "doecorp"
    },
    "address_work": {
      "billing": {
        "line1": "86 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2086",
        "country": "Australia"
      },
      "billing2": {
        "line1": "87 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2087",
        "country": "Australia"
      },
      "shipping": {
        "line1": "88 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2088",
        "country": "Australia"
      },
      "shipping2": {
        "line1": "89 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2089",
        "country": "Australia"
      }
    },
    "address_home": {
      "billing": {
        "line1": "90 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2090",
        "country": "Australia"
      },
      "billing2": {
        "line1": "91 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2091",
        "country": "Australia"
      },
      "shipping": {
        "line1": "92 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2092",
        "country": "Australia"
      },
      "shipping2": {
        "line1": "93 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2093",
        "country": "Australia"
      }
    },
    "email": {
      "address": "john17@maestrano.com",
      "address2": "jack17@example.com"
    },
    "website": {
      "url": "www.website17.com",
      "url2": "www.mywebsite17.com"
    },
    "phone_work": {
      "landline": "+61 2 8574 1222",
      "landline2": "+1 2 8574 1222",
      "mobile": "+61 449 785 122",
      "mobile2": "+1 449 785 122",
      "fax": "+61 2 9974 1222",
      "fax2": "+1 2 9974 1222",
      "pager": "+61 440 785 122",
      "pager2": "+1 440 785 122"
    },
    "phone_home": {
      "landline": "+61 2 8574 1223",
      "landline2": "+1 2 8574 1223",
      "mobile": "+61 449 785 123",
      "mobile2": "+1 449 785 123",
      "fax": "+61 2 9974 1223",
      "fax2": "+1 2 9974 1223",
      "pager": "+61 440 785 123",
      "pager2": "+1 440 785 123"
    },
    "lead_status": "Hot",
    "lead_source": "Cold call",
    "lead_status_changes": [
      {
        "status": "Hot",
        "created_at": "2016-05-24T04:24:08Z"
      }
    ],
    "lead_referent_type": "Entity::Person",
    "lead_referent_id": "48427741-0395-0134-53b9-5969c36333f5",
    "assignee_type": "AppUser",
    "assignee_id": "1ed17491-e9b1-0133-9582-0d535fd9d9bb",
    "referred_leads": [
      {
        "id": "48427741-0395-0134-53b9-5969c36333f5",
        "first_name": "John",
        "last_name": "Doe",
        "organization_id": "66731af1-e746-0133-b179-7caa147a84c2"
      }
    ],
    "opportunities": [
      {
        "id": "15a7c661-fec6-0133-bfc8-5fbf8265841f",
        "code": "POT1",
        "name": "A opportunity name",
        "lead_id": "48427741-0395-0134-53b9-5969c36333f5",
        "description": "Context still needs to be clarified with the customer",
        "sales_stage": "Qualified",
        "type": "New Business",
        "expected_close_date": "2016-03-28T07:12:51Z",
        "amount": {
          "total_amount": 1080
        },
        "probability": 10,
        "next_step": "Qualification",
        "sales_stage_changes": [
          {
            "status": "Open",
            "created_at": "2016-05-18T01:30:53Z"
          },
          {
            "status": "Qualified",
            "created_at": "2016-05-18T01:35:58Z"
          }
        ],
        "assignee_type": "AppUser",
        "assignee_id": "b5dbd78a-26da-4e55-ad84-625b25d67622",
        "created_at": "2016-05-18T01:30:53Z",
        "updated_at": "2016-05-24T04:28:18Z"
      }
    ],
    "notes": [
      {
        "id": "546abf25ebe39067cb0000ce",
        "description": "Something to be aware of!",
        "tag": "123",
        "value": "456"
      }
    ],
    "tasks": [
      {
        "id": "ff6e5211-0393-0134-5392-5969c36333f5",
        "code": "TA1",
        "dependencies": [],
        "time_logs": [],
        "assignees": [],
        "created_at": "2016-05-24T04:15:01Z",
        "updated_at": "2016-05-24T04:28:38Z"
      }
    ],
    "created_at": "2016-05-24T04:24:08Z",
    "updated_at": "2016-05-24T04:29:14Z",
    "channel_id": "org-fbbw",
    "resource_type": "people"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Person
PUT/api/v2/:group_id/people/{id}

Update a single Person

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The person ID


Projects

Projects List

GET https://api-connec.maestrano.com/api/v2/:group_id/projects
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "projects" : [
    {
      "id": "5724bcf1-5103-0132-6651-600308937d74",
      "group_id": "cld-7gr8e5",
      "created_at": "2014-11-18T03:45:59Z",
      "updated_at": "2015-01-11T03:45:59Z",
      "name": "Website Redesign",
      "description": "Redesign the current website",
      "status": "STARTED",
      "priority": "MEDIUM",
      "first_day_of_week": "MON",
      "work_days": ["MON", "TUE", "WED", "THU", "FRI"],
      "start_date": "2015-01-01T00:00:00Z",
      "due_date": "2015-12-31T00:00:00Z",
      "completed_date": "2015-11-31T00:00:00Z",
      "parent_project_id": "5724bcf1-5103-0132-6651-66278937d74",
      "organization_id": "8473bcf1-5103-0132-6651-66278937v76",
      "work_location_id": "0934bcf1-5103-0132-6651-66278937w54",
      "sub_projects": [
        {
          "id": "5724bdd1-5103-0132-6651-600308937d74"
        }
      ],
      "milestones": [
        {
          "id": "5724bdd1-5453-0132-6651-600308937d74"
        }
      ],
      "task_lists": [
        {
          "id": "5724bdd1-5453-0132-6651-600308937d74"
        }
      ],
      "tasks": [
        {
          "id": "5724bed1-5453-0132-6651-600308937d74"
        },
        {
          "id": "d92a69c1-53cd-0133-9e69-062f2dc812d3"
        }
      ],
      "participants": [
        {
          "id": "561cedef73673ae4bb000007",
          "role": 'SUPERVISOR',
          "rights": 'ALL',
          "status": 'ACTIVE',
          "app_user_id": "5724bdd1-5453-0132-6651-6003089sdfsdf",
          "team_id": "5724bdd1-5453-0132-6741-6003089sdfsdf"
        },
        {
          "id": "561cedef73673a5bbb0000a1",
          "role": 'OWNER',
          "rights": 'ALL',
          "status": 'ACTIVE',
          "app_user_id": "a2b76d01-4f88-0133-c32e-062f2dc812d3"
        }
      ],
      "files": [
        {
          "id": "6003089sdfsdf13318650",
          "name": "Contract",
          "url": "http://store_doc.io/788887",
          "size": 56789,
          "description": "Project contract with the client"
        }
      ]
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "accounts": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "description": "Project UUID",
              "type": "string",
              "readOnly": true
            },
            "group_id": {
              "description": "Group ID",
              "type": "string"
            },
            "created_at": {
              "description": "Object creation timestamp",
              "type": "string",
              "format": "date-time",
              "readOnly": true
            },
            "updated_at": {
              "description": "Object last update timestamp",
              "type": "string",
              "format": "date-time",
              "readOnly": true
            },
            "name": {
              "description": "Project name",
              "type": "string"
            },
            "code": {
              "description": "Project code, auto-generated if not specified",
              "type": "string"
            },
            "description": {
              "description": "Project description",
              "type": "string"
            },
            "status": {
              "description": "Project status",
              "enum": ["DRAFT", "STARTED", "COMPLETED", "ARCHIVED", "CANCELED", ...]
            },
            "priority": {
              "description": "Project priority",
              "enum": ["HIGH", "MEDIUM", "LOW", ...]
            },
            "first_day_of_week": {
              "description": "First day of week",
              "enum": ["MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"]
            },
            "work_days": {
              "type": "array",
              "items": [
                {
                  "type": "enum",
                  "enum": ["MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"]
                }
              ]
            },
            "start_date": {
              "description": "Project start date",
              "type": "date-time"
            },
            "due_date": {
              "description": "Project end date",
              "type": "date-time"
            },
            "completed_date": {
              "description": "Project completion date",
              "type": "date-time"
            },
            "parent_project_id": {
              "description": "Parent Project reference ID",
              "type": "string"
            },
            "organization_id": {
              "description": "Organization UUID the project belongs to (customer reference)",
              "type": "string"
            },
            "sub_projects": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Project reference ID",
                      "type": "string"
                    }
                  }
                }
              }
            },
            "milestones": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Milestone reference ID",
                      "type": "string"
                    }
                  }
                }
              }
            },
            "task_lists": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Task List reference ID",
                      "type": "string"
                    }
                  }
                }
              }
            },
            "tasks": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Task reference ID",
                      "type": "string"
                    }
                  }
                }
              }
            },
            "participants": {
              "type": "array",
              "items": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "Participant entry ID",
                      "type": "string"
                    },
                    "role": {
                      "description": "Role on the Project",
                      "type": "enum",
                      "enum": ["OWNER", "SUPERVISOR", "RESPONSIBLE", "PARTICIPANT", ...]
                    },
                    "status": {
                      "description": "Participant status",
                      "enum": ["ACTIVE", "INACTIVE"],
                      "default": "ACTIVE"
                    },
                    "rights": {
                      "description": "Project permissions",
                      "type": "enum",
                      "enum": ["ALL", "READ", "WRITE", "APPROVER", ...]
                    },
                    "app_user_id": {
                      "description": "Reference to an Application User",
                      "type": "string"
                    },
                    "team_id": {
                      "description": "Reference to a Team of Application Users",
                      "type": "string"
                    },
                    "organization_id": {
                      "description": "Reference to an Organization (customer)",
                      "type": "string"
                    },
                    "person_id": {
                      "description": "Reference to a Person (contact)",
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Get Projects
GET/api/v2/:group_id/projects

Get the list of projects.

Attributes

Field Type Description
id String Project UUID
group_id String Group ID
created_at Date-time Project creation date
updated_at Date-time Project last update date
code String Code, auto-generated if not specified
status Enum [DRAFT, STARTED, COMPLETED, ARCHIVED, CANCELED]
name String Project name
description String Project description
priority Enum [HIGHEST, HIGH, MEDIUM, LOW, LOWEST]
first_day_of_week Enum [SAT, SUN, MON, …]
work_days Array Array of string: MON, TUE, …
start_date Date-time Project start date
due_date Date-time Project due date
completed_date Date-time Project completed date
parent_project_id Reference Parent project
organization_id Reference Organization involved or impacted
work_location_id Reference Work location the project is happening at
sub_projects Array Project sub-projects
milestones Array Project milestones
task_lists Array Project task lists
tasks Array Project tasks
participants Array Project participants
files Array Project files
Project composants attributes

Sub-projects, milestones, task lists and tasks

Field Type Description
id String Composant UUID
Project participants attributes
Field Type Description
id String Participant id
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
role Enum [OWNER, SUPERVISOR, RESPONSIBLE, PARTICIPANT]
rights Enum [ALL, READ, WRITE, APPROVER]
app_user_id Reference Application user representing the participant
team_id Reference Team representing the participant
Project files attributes
Field Type Description
id String File id
name String File name
url String File url
description String File description
size Number File size in octet

POST https://api-connec.maestrano.com/api/v2/:group_id/projects
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "projects": {
    "name": "Project name",
    "description": "My project"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "projects": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "name": "Project name",
    "description": "My project"
  }
}

Create New Project
POST/api/v2/:group_id/projects

Create a new project.


Project

GET https://api-connec.maestrano.com/api/v2/:group_id/projects/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "projects": {
    "id": "5724bcf1-5103-0132-6651-600308937d74",
    "group_id": "cld-7gr8e5",
    "created_at": "2014-11-18T03:45:59Z",
    "updated_at": "2015-01-11T03:45:59Z",
    "name": "My project",
    "description": "This is my own little project",
    "status": "COMPLETED"
    "priority": "LOW"
    "first_day_of_week": "SAT"
    "work_days": ["MON", "TUE", "FRI"]
    "start_date": "2014-11-20T09:00:00Z",
    "due_date": "2014-12-20T18:00:00Z",
    "completed_date": "2014-12-19T15:00:00Z",
    "parent_project_id": "5724bcf1-5103-0132-6651-66278937d74",
    "sub_projects": [
      {
        "id": "5724bdd1-5103-0132-6651-600308937d74"
      }
    ],
    "milestones": [
      {
        "id": "5724bdd1-5453-0132-6651-600308937d74"
      }
    ],
    "task_lists": [
      {
        "id": "5724bdd1-5453-0132-6651-600308937d74"
      }
    ],
    "tasks": [
      {
        "id": "5724bed1-5453-0132-6651-600308937d74"
      }
    ],
    "participants": [
      {
        "id": "561cedef73673ae4bb000007",
        "role": 'SUPERVISOR',
        "rights": 'ALL',
        "status": 'ACTIVE',
        "app_user_id": "5724bdd1-5453-0132-6651-6003089sdfsdf",
        "team_id": "5724bdd1-5453-0132-6741-6003089sdfsdf"
      }
    ],
    "files": [
      {
        "id": "6003089sdfsdf13318650",
        "name": "Contract",
        "url": "http://store_doc.io/788887",
        "size": 56789,
        "description": "Project contract with the client"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Project
GET/api/v2/:group_id/projects/{id}

Get a single project.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The project ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/projects/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "projects": {
    "status": "COMPLETED"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "projects": {
    "id": "5724bcf1-5103-0132-6651-600308937d74",
    "group_id": "cld-7gr8e5",
    "created_at": "2014-11-18T03:45:59Z",
    "updated_at": "2015-01-11T03:45:59Z",
    "name": "My project",
    "description": "This is my own little project",
    "status": "COMPLETED"
    "priority": "LOW"
    "first_day_of_week": "SAT"
    "work_days": ["MON", "TUE", "FRI"]
    "start_date": "2014-11-20T09:00:00Z",
    "due_date": "2014-12-20T18:00:00Z",
    "completed_date": "2014-12-19T15:00:00Z",
    "parent_project_id": "5724bcf1-5103-0132-6651-66278937d74",
    "sub_projects": [
      {
        "id": "5724bdd1-5103-0132-6651-600308937d74"
      }
    ],
    "milestones": [
      {
        "id": "5724bdd1-5453-0132-6651-600308937d74"
      }
    ],
    "task_lists": [
      {
        "id": "5724bdd1-5453-0132-6651-600308937d74"
      }
    ],
    "tasks": [
      {
        "id": "5724bed1-5453-0132-6651-600308937d74"
      }
    ],
    "participants": [
      {
        "id": "561cedef73673ae4bb000007",
        "role": 'SUPERVISOR',
        "rights": 'ALL',
        "status": 'ACTIVE',
        "app_user_id": "5724bdd1-5453-0132-6651-6003089sdfsdf",
        "team_id": "5724bdd1-5453-0132-6741-6003089sdfsdf"
      }
    ],
    "files": [
      {
        "id": "6003089sdfsdf13318650",
        "name": "Contract",
        "url": "http://store_doc.io/788887",
        "size": 56789,
        "description": "Project contract with the client"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a Project
PUT/api/v2/:group_id/projects/{id}

Update a single Project

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The project ID


Purchase Orders

Purchase Orders JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/purchase_orders
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "invoices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Purchase Order UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "title": {
            "description": "Purchase Order friendly name",
            "type": "string"
          },
          "transaction_number": {
            "description": "Reference number of the Purchase Order",
            "type": "string"
          },
          "transaction_date": {
            "description": "Purchase Order creation date, defaults to today if not specified",
            "type": "date-time"
          },
          "due_date": {
            "description": "Purchase Order due date, defaults to today if not specified",
            "type": "date-time"
          },
          "status": {
            "description": "Purchase Order status",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "AUTHORISED",
              "PAID",
              "VOIDED",
              "INACTIVE"
            ],
            "default": "DRAFT"
          },
          "type": {
            "description": "Purchase Order type indicates if it is a sale order or a purchase order",
            "enum": [
              "CUSTOMER",
              "SUPPLIER"
            ],
            "default": "CUSTOMER"
          },
          "balance": {
            "description": "Amount left to be paid",
            "type": "number"
          },
          "deposit": {
            "description": "Amount paid to date",
            "type": "number"
          },
          "discount_percent": {
            "description": "Total discount percentage deducted on the purchase order total",
            "type": "number"
          },
          "discount_amount": {
            "description": "Fixed discount amount deducted on the purchase order total",
            "type": "number"
          },
          "public_note": {
            "description": "Note visible to the customer on the invoice",
            "type": "string"
          },
          "private_note": {
            "description": "Internal note not visible to the customer",
            "type": "string"
          },
          "organization_id": {
            "description": "Reference of the customer or supplier Organization",
            "type": "string"
          },
          "person_id": {
            "description": "Reference of the customer or supplier Person",
            "type": "string"
          },
          "warehouse_id": {
            "description": "Reference of the Warehouse to use for inventory management",
            "type": "string"
          },
          "billing_address": {
            "$ref": "#/definitions/address"
          },
          "shipping_address": {
            "$ref": "#/definitions/address"
          },
          "quote_id": {
            "description": "Reference of the parent Quote",
            "type": "string"
          },
          "lines": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "Transaction line ID",
                    "type": "string"
                  },
                  "line_number": {
                    "description": "Transaction line number used for ordering",
                    "type": "integer"
                  },
                  "description": {
                    "description": "Transaction line description",
                    "type": "string"
                  },
                  "status": {
                    "description": "Transaction line status",
                    "enum": [
                      "ACTIVE",
                      "INACTIVE"
                    ],
                    "default": "ACTIVE"
                  },
                  "quantity": {
                    "description": "Quantity of Items",
                    "type": "number"
                  },
                  "reduction_percent": {
                    "description": "Reduction percentage applicable",
                    "type": "number"
                  },
                  "unit_price": {
                    "$ref": "#/definitions/price"
                  },
                  "total_price": {
                    "$ref": "#/definitions/price",
                    "readOnly": true
                  },
                  "service_date": {
                    "description": "Delivery date of the item/service",
                    "type": "string",
                    "format": "date-time"
                  },
                  "tax_code_id": {
                    "description": "Reference to the Tax Code applicable on the transaction line",
                    "type": "string"
                  },
                  "item_id": {
                    "description": "Reference to the Item of the transaction line",
                    "type": "string"
                  },
                  "account_id": {
                    "description": "Reference to the Account of the transaction line",
                    "type": "string"
                  },
                  "organization_id": {
                    "description": "Reference of the Customer or Supplier applicable to the transaction line",
                    "type": "string"
                  },
                  "payment_method_id": {
                    "description": "Reference to the Payment Method of the transaction line",
                    "type": "string"
                  },
                  "linked_transactions": {
                    "type": "array",
                    "items": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "description": "LinkedTransaction line ID",
                            "type": "string"
                          },
                          "applied_amount": {
                            "description": "Amount applied on the linked transaction",
                            "type": "number"
                          },
                          "transactionable_id": {
                            "description": "Reference to the Transaction UUID",
                            "type": "string"
                          },
                          "transactionable_type": {
                            "description": "Reference to the Transaction type (Invoice, Payment, CreditNote, etc...)",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/purchase_orders

Attributes

Field Type Description
id String Purchase Order UUID
group_id String Group ID
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Unique code, auto-generated if not specified
title String Purchase Order friendly name
transaction_number String Reference number of the Purchase Order
transaction_date Date Time Purchase Order creation date, defaults to today if not specified
due_date Date Time Purchase Order due date, defaults to today if not specified
status Purchase Order status
type Purchase Order type indicates if it is a sale order or a purchase order
balance Number Amount left to be paid
deposit Number Amount paid to date
discount_percent Number Total discount percentage deducted on the purchase order total
discount_amount Number Fixed discount amount deducted on the purchase order total
public_note String Note visible to the customer on the invoice
private_note String Internal note not visible to the customer
organization_id String Reference of the customer or supplier Organization
person_id String Reference of the customer or supplier Person
warehouse_id String Reference of the Warehouse to use for inventory management
billing_address Address
shipping_address Address
quote_id String Reference of the parent Quote
lines Array
PurchaseOrders Lines attributes
Field Type Description
id String Transaction line ID
line_number Integer Transaction line number used for ordering
description String Transaction line description
status Transaction line status
quantity Number Quantity of Items
reduction_percent Number Reduction percentage applicable
unit_price Price
total_price Price
service_date Date Time Delivery date of the item/service
tax_code_id String Reference to the Tax Code applicable on the transaction line
item_id String Reference to the Item of the transaction line
account_id String Reference to the Account of the transaction line
organization_id String Reference of the Customer or Supplier applicable to the transaction line
payment_method_id String Reference to the Payment Method of the transaction line
linked_transactions Array
PurchaseOrders LinkedTransactions attributes
Field Type Description
id String LinkedTransaction line ID
applied_amount Number Amount applied on the linked transaction
transactionable_id String Reference to the Transaction UUID
transactionable_type String Reference to the Transaction type (Invoice, Payment, CreditNote, etc…)

PurchaseOrders List

GET https://api-connec.maestrano.com/api/v2/:group_id/purchase_orders
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "purchase_orders": [
    {
      "id": "b3f169f0-5a96-0132-30de-600308937d74",
      "group_id": "cld-fd45gf12",
      "created_at": "2014-11-30T08:13:34Z",
      "updated_at": "2014-11-30T08:13:34Z",
      "code": "171",
      "title": "Stationery supplies for 2015",
      "transaction_number": "SUP2015",
      "transaction_date": "2015-01-12T00:00:00Z",
      "due_date": "2015-01-31T00:00:00Z",
      "status": "DRAFT",
      "type": "SUPPLIER",
      "balance": 33,
      "deposit": 0,
      "discount_percent": 0,
      "discount_amount": 0,
      "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
      "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
      "public_note": "Note visible on the order",
      "private_note": "Note not visible on the order",
      "currency_rate": 0.8794,
      "amount": {
        "total_amount": 33,
        "net_amount": 30,
        "tax_amount": 3,
        "tax_rate": 10,
        "currency": "USD"
      },
      "billing_address": {
        "line1": "210 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2000",
        "country": "AU"
      },
      "shipping_address": {
        "line1": "210 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2000",
        "country": "AU"
      },
      "lines": [
        {
          "id": "54b323b30202cbd6da000be5",
          "line_number": 1,
          "description": "2015 notebook",
          "status": "ACTIVE",
          "quantity": 10,
          "reduction_percent": 0,
          "service_date": "2015-01-29T08:13:34Z",
          "unit_price": {
            "total_amount": 1.1,
            "net_amount": 1,
            "tax_amount": 0.1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "total_price": {
            "total_amount": 11,
            "net_amount": 10,
            "tax_amount": 1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
          "account_id": "qwd88ac1-5a96-0132-30d1-600308937d32",
          "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
        },
        {
          "id": "54b323b70202cbd6da000dbb",
          "line_number": 2,
          "description": "2015 calendar A3 format",
          "status": "ACTIVE",
          "quantity": 2,
          "reduction_percent": 0,
          "service_date": "2015-01-27T08:13:34Z",
          "unit_price": {
            "total_amount": 11,
            "net_amount": 10,
            "tax_amount": 1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "total_price": {
            "total_amount": 22,
            "net_amount": 20,
            "tax_amount": 2,
            "tax_rate": 10,
            "currency": "USD"
          },
          "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
          "account_id": "qwd88ac1-5a96-0132-30d1-600308937d32",
          "item_id": "a3d6dd11-5a96-0132-30cf-600308937d33"
        }
      ]
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",

  "type": "object",
  "properties": {
    "purchase_orders": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "PurchaseOrder UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "title": {
            "description": "PurchaseOrder friendly name",
            "type": "string"
          },
          "transaction_number": {
            "description": "Reference number of the PurchaseOrder",
            "type": "string"
          },
          "transaction_date": {
            "description": "PurchaseOrder creation date",
            "type": "date-time"
          },
          "due_date": {
            "description": "PurchaseOrder due date",
            "type": "date-time"
          },
          "status": {
            "description": "PurchaseOrder status",
            "enum": ["DRAFT", "SUBMITTED", "AUTHORISED", "PAID", "VOIDED", "INACTIVE"],
            "default": "DRAFT"
          },
          "type": {
            "description": "Customer or supplier",
            "enum": ["CUSTOMER", "SUPPLIER"],
            "default": "SUPPLIER",
          },
          "balance": {
            "description": "Amount left to be paid",
            "type": "number"
          },
          "deposit": {
            "description": "Amount paid to date",
            "type": "number"
          },
          "discount_percent": {
            "description": "Total discount percentage deducted on the purchase_order total",
            "type": "number"
          },
          "discount_amount": {
            "description": "Fixed discount amount deducted on the purchase_order total",
            "type": "number"
          },
          "organization_id": {
            "description": "Reference of the customer or supplier Organization",
            "type": "string"
          },
          "person_id": {
            "description": "Reference of the customer or supplier Person",
            "type": "string"
          },
          "public_note": {
            "description": "Note visible on the order",
            "type": "string"
          },
          "private_note": {
            "description": "Note not visible on the order",
            "type": "string"
          },
          "currency_rate": {
            "description": "Rate for the currency pair at the date of the transaction.",
            "type": "number"
          },
          "amount": {
            "$ref": "#/definitions/price",
            "readOnly": true
          },
          "billing_address": {
            "$ref": "#/definitions/address"
          },
          "shipping_address": {
            "$ref": "#/definitions/address"
          },
          "lines": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "PurchaseOrder line ID",
                    "type": "string"
                  },
                  "line_number": {
                    "description": "PurchaseOrder line number used for ordering",
                    "type": "integer"
                  },
                  "status": {
                    "description": "PurchaseOrder line status",
                    "enum": ["ACTIVE", "INACTIVE"],
                    "default": "ACTIVE"
                  },
                  "quantity": {
                    "description": "Quantity of Items",
                    "type": "number"
                  },
                  "reduction_percent": {
                    "description": "Reduction percentage applicable",
                    "type": "number"
                  },
                  "unit_price": {
                    "$ref": "#/definitions/price"
                  },
                  "total_price": {
                    "$ref": "#/definitions/price",
                    "readOnly": true
                  },
                  "service_date": {
                    "description": "Delivery date of the item/service",
                    "type": "string",
                    "format": "date-time"
                  },
                  "tax_code_id": {
                    "description": "Reference to the Tax Code applicable on the purchase_order line",
                    "type": "string"
                  },
                  "item_id": {
                    "description": "Reference to the Item of the purchase_order line",
                    "type": "string"
                  },
                  "account_id": {
                    "description": "Reference to the Account of the purchase_order line",
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Get PurchaseOrders
GET/api/v2/:group_id/purchase_orders

Get the list of purchase_orders.

Attributes

Field Type Description
id String Purchase order UUID
group_id String Group ID
created_at Date-time Purchase order creation date
updated_at Date-time Purchase order last update date
code String Code, auto-generated if not specified
status Enum [DRAFT, SUBMITTED, AUTHORISED, PAID, VOIDED, INACTIVE] - Default: DRAFT
title String Purchase order title
transaction_number String Purchase order number
transaction_date Date-time Purchase order date
due_date Date-time Purchase order due date
type Enum [CUSTOMER, SUPPLIER] - Default: SUPPLIER
deposit Number Purchase order deposit
balance Number Purchase order balance, calculated based on the purchase_order amount and deposit
discount_percent Number Total discount percentage deducted on the purchase order total
discount_amount Number Total discount amount deducted on the purchase order total
currency_rate Number Rate for the currency pair at the date of the transaction
amount Price Purchase order total amount, calculated based on the purchase order lines
private_note String Private note not visible on the purchase order
public_note String Public note visible on the purchase order
organization_id Reference Purchase order supplier/customer organization
person_id Reference Purchase order supplier/customer contact
billing_address Address Billing address
shipping_address Address Shipping address
lines Array Purchase order details
Purchase order lines attributes
Field Type Description
id String Line id
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
line_number String Line number
description String Line description
reduction_percent Number Reduction percentage applicable
service_date Date-time Delivery date of the item/service
quantity Number Item quantity
unit_price Price Item unit price
total_price Price Line total price, calculated with unit_price and quantity
tax_code_id Reference Tax code applied to this line
account_id Reference Account used for this invoice
item_id Reference Item concerned by this line

POST https://api-connec.maestrano.com/api/v2/:group_id/purchase_orders
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "purchase_orders": {
        "due_date": "2014-12-05T08:13:31Z",
        "title": "Team meeting catering 12-01-2015",
        "status": "DRAFT",
        "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
        "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
        "lines: [
            {
                "id: "54b323b30202cbd6da000be5",
                "line_number": 1,
                "description: "Medium size pizza",
                "quantity: 6,
                "unit_price: {
                    "total_amount: 16.5,
                    "net_amount: 15.0,
                    "tax_amount: 1.5,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799",
                "item_id: "ddc285c1-5a96-0132-31b8-600308937d74"
            },
            {
                "id: "54b323b70202cbd6da000dbb",
                "line_number": 2,
                "description: "Mixed salad",
                "quantity: 2,
                "unit_price: {
                    "total_amount: 13.2,
                    "net_amount: 12.0,
                    "tax_amount: 1.2,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799"
            }
        ]
    }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
    "purchase_orders": {
        "id": "e32303c1-5102-0132-661e-600308937d74",
        "group_id": "cld-4d7f86",
        "created_at": "2014-12-18T03:42:45Z",
        "updated_at": "2014-12-18T03:42:45Z",
        "due_date": "2014-12-05T08:13:31Z",
        "status": "DRAFT",
        "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
        "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
        "currency_rate": 0.8794,
        "amount": {
            "total_amount": 125.4,
            "net_amount": 113.0,
            "tax_amount": 11.4,
            "tax_rate": 10.0,
            "currency": "USD"
        },
        "lines: [
            {
                "id: "line1",
                "line_number": 1,
                "description: "Medium size pizza",
                "quantity: 6,
                "unit_price: {
                    "total_amount: 16.5,
                    "net_amount: 15.0,
                    "tax_amount: 1.5,
                    "tax_rate: 10.0
                },
                "total_price: {
                    "total_amount: 99.0,
                    "net_amount: 90.0,
                    "tax_amount: 9.0,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799",
                "item_id: "ddc285c1-5a96-0132-31b8-600308937d74"
            },
            {
                "id: "line2",
                "line_number": 2,
                "description: "Mixed salad",
                "quantity: 2,
                "unit_price: {
                    "total_amount: 13.2,
                    "net_amount: 12.0,
                    "tax_amount: 1.2,
                    "tax_rate: 10.0
                },
                "total_price: {
                    "total_amount: 26.4,
                    "net_amount: 24.0,
                    "tax_amount: 2.4,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799"
            }
        ]
    }
}

Create New PurchaseOrder
POST/api/v2/:group_id/purchase_orders

Create a new purchase_order.


PurchaseOrder

GET https://api-connec.maestrano.com/api/v2/:group_id/purchase_orders/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "purchase_orders": {
    "id": "b3f169f0-5a96-0132-30de-600308937d74",
    "group_id": "cld-fd45gf12",
    "created_at": "2014-11-30T08:13:34Z",
    "updated_at": "2014-11-30T08:13:34Z",
    "transaction_number": "txn_00005",
    "transaction_date": "2014-11-30T08:13:31Z",
    "due_date": "2014-12-05T08:13:31Z",
    "status": "DRAFT",
    "balance": 26,
    "deposit": 0,
    "discount_percent": 0,
    "discount_amount": 0,
    "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
    "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
    "currency_rate": 0.8794,
    "amount": {
      "total_amount": 33,
      "net_amount": 30,
      "tax_amount": 3,
      "tax_rate": 10,
      "currency": "USD"
    },
    "billing_address": {
      "line1": "62 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2062",
      "country": "AU"
    },
    "shipping_address": {
      "line1": "64 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2064",
      "country": "AU"
    },
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 1,
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 10,
          "net_amount": 9,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      },
      {
        "id": "54b323b70202cbd6da000dbb",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 2,
        "status": "ACTIVE",
        "quantity": 2,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 22,
          "net_amount": 20,
          "tax_amount": 2,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get PurchaseOrder
GET/api/v2/:group_id/purchase_orders/{id}

Get a single purchase_order.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The purchase_order ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/purchase_orders/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "purchase_orders": {
        "due_date": "2015-31-01T00:00:00Z",
        "status": "AUTHORIZED",
        "lines: [
            {
                "id": "54b323b30202cbd6da000be5",
                "quantity": 6
            }
        }
    }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "purchase_orders": {
    "id": "b3f169f0-5a96-0132-30de-600308937d74",
    "group_id": "cld-fd45gf12",
    "created_at": "2014-11-30T08:13:34Z",
    "updated_at": "2014-11-30T08:13:34Z",
    "transaction_number": "txn_00005",
    "transaction_date": "2014-11-30T08:13:31Z",
    "due_date": "2014-12-05T08:13:31Z",
    "status": "DRAFT",
    "balance": 26,
    "deposit": 0,
    "discount_percent": 0,
    "discount_amount": 0,
    "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
    "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
    "currency_rate": 0.8794,
    "amount": {
      "total_amount": 33,
      "net_amount": 30,
      "tax_amount": 3,
      "tax_rate": 10,
      "currency": "USD"
    },
    "billing_address": {
      "line1": "62 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2062",
      "country": "AU"
    },
    "shipping_address": {
      "line1": "64 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2064",
      "country": "AU"
    },
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 1,
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 10,
          "net_amount": 9,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      },
      {
        "id": "54b323b70202cbd6da000dbb",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 2,
        "status": "ACTIVE",
        "quantity": 2,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 22,
          "net_amount": 20,
          "tax_amount": 2,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an PurchaseOrder
PUT/api/v2/:group_id/purchase_orders/{id}

Update a single PurchaseOrder. For an purchase_order line to be deleted, the status of the purchase_order line must be set to “INACTIVE”

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The purchase_order ID


Quotes

Business Rules

  • If a tax_code_id is specified for an quote line, the associated tax rate is used to calculate the total_price of the line

Quotes List

GET https://api-connec.maestrano.com/api/v2/:group_id/quotes
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "quotes": [
    {
      "id": "b3f169f0-5a96-0132-30de-600308937d74",
      "group_id": "cld-fd45gf12",
      "created_at": "2014-11-30T08:13:34Z",
      "updated_at": "2014-11-30T08:13:34Z",
      "code": "QO171",
      "title": "Stationery supplies for 2015",
      "transaction_number": "SUP2015",
      "transaction_date": "2015-01-12T00:00:00Z",
      "due_date": "2015-01-31T00:00:00Z",
      "status": "DRAFT",
      "discount_percent": 0,
      "discount_amount": 0,
      "balance": 30,
      "deposit": 3,
      "public_note": "Thanks for shopping with us!",
      "private_note": "Private note",
      "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
      "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
      "amount": {
        "total_amount": 33,
        "net_amount": 30,
        "tax_amount": 3,
        "tax_rate": 10,
        "currency": "USD"
      },
      "billing_address": {
        "line1": "210 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2000",
        "country": "AU"
      },
      "shipping_address": {
        "line1": "210 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2000",
        "country": "AU"
      },
      "lines": [
        {
          "id": "54b323b30202cbd6da000be5",
          "line_number": 1,
          "description": "2015 notebook",
          "status": "ACTIVE",
          "quantity": 10,
          "reduction_percent": 0,
          "service_date": "2015-01-29T08:13:34Z",
          "unit_price": {
            "total_amount": 1.1,
            "net_amount": 1,
            "tax_amount": 0.1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "total_price": {
            "total_amount": 11,
            "net_amount": 10,
            "tax_amount": 1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
          "account_id": "q2d52f61-5a96-0132-30ce-600308937dsx",
          "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
        },
        {
          "id": "54b323b70202cbd6da000dbb",
          "line_number": 2,
          "description": "2015 calendar A3 format",
          "status": "ACTIVE",
          "quantity": 2,
          "unit_price": {
            "total_amount": 11,
            "net_amount": 10,
            "tax_amount": 1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "total_price": {
            "total_amount": 22,
            "net_amount": 20,
            "tax_amount": 2,
            "tax_rate": 10,
            "currency": "USD"
          },
          "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
          "account_id": "q2d52f61-5a96-0132-30ce-600308937dsx",
          "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74"
        }
      ]
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",

  "type": "object",
  "properties": {
    "quotes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Quote UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "title": {
            "description": "Quote friendly name",
            "type": "string"
          },
          "transaction_number": {
            "description": "Reference number of the Quote",
            "type": "string"
          },
          "transaction_date": {
            "description": "Quote creation date",
            "type": "date-time"
          },
          "due_date": {
            "description": "Quote due date",
            "type": "date-time"
          },
          "status": {
            "description": "Quote status",
            "enum": ["DRAFT", "REVIEWED", "PENDING", "ACCEPTED", "REJECTED", "CLOSED"],
            "default": "DRAFT"
          },
          "discount_percent": {
            "description": "Total discount percentage deducted on the quote total",
            "type": "number"
          },
          "discount_amount": {
            "description": "Fixed discount amount deducted on the quote total",
            "type": "number"
          },
          "organization_id": {
            "description": "Reference of the customer or supplier Organization",
            "type": "string"
          },
          "public_note": {
            "description": "Note visible on the order",
            "type": "string"
          },
          "private_note": {
            "description": "Note not visible on the order",
            "type": "string"
          },
          "person_id": {
            "description": "Reference of the customer or supplier Person",
            "type": "string"
          },
          "amount": {
            "$ref": "#/definitions/price",
            "readOnly": true
          },
          "billing_address": {
            "$ref": "#/definitions/address"
          },
          "shipping_address": {
            "$ref": "#/definitions/address"
          },
          "lines": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "Quote line ID",
                    "type": "string"
                  },
                  "line_number": {
                    "description": "Quote line number used for ordering",
                    "type": "integer"
                  },
                  "status": {
                    "description": "Quote line status",
                    "enum": ["ACTIVE", "INACTIVE"],
                    "default": "ACTIVE"
                  },
                  "quantity": {
                    "description": "Quantity of Items",
                    "type": "number"
                  },
                  "reduction_percent": {
                    "description": "Reduction percentage applicable",
                    "type": "number"
                  },
                  "unit_price": {
                    "$ref": "#/definitions/price"
                  },
                  "total_price": {
                    "$ref": "#/definitions/price",
                    "readOnly": true
                  },
                  "service_date": {
                    "description": "Delivery date of the item/service",
                    "type": "string",
                    "format": "date-time"
                  },
                  "tax_code_id": {
                    "description": "Reference to the Tax Code applicable on the quote line",
                    "type": "string"
                  },
                  "item_id": {
                    "description": "Reference to the Item of the quote line",
                    "type": "string"
                  },
                  "account_id": {
                    "description": "Reference to the Account of the quote line",
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Get Quotes
GET/api/v2/:group_id/quotes

Get the list of quotes.

Attributes

Field Type Description
id String Quote UUID
group_id String Group ID
created_at Date-time Quote creation date
updated_at Date-time Quote last update date
code String Code, auto-generated if not specified
status Enum [DRAFT, REVIEWED, PENDING, ACCEPTED, REJECTED, CLOSED] - Default: DRAFT
title String Quote title
transaction_number String Quote number
transaction_date Date-time Quote date
due_date Date-time Quote due date
type Enum [CUSTOMER, SUPPLIER] - Default: CUSTOMER
balance Number Quote balance, calculated with amount and deposit
deposit Number Quote deposit - amount that has already been paid
discount_percent Number Discount percentage applied to the quote
discount_amount Number Discount amount applied to the quote
public_note String Note visible by the customer on the quote
private_note String Internal note not visible by the customer
organization_id Reference The quote customer/supplier organization
person_id Reference The quote customer/supplier contact
billing_address Address Invoice billing address
shipping_address Address Invoice shipping address
lines Array Invoice detail
Quote lines attributes
Field Type Description
id String Line id
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
line_number String Line number
description String Line description
reduction_percent Number Reduction percentage applicable
service_date Date-time Delivery date of the item/service
quantity Number Item quantity
unit_price Price Item unit price
total_price Price Line total price, calculated with unit_price and quantity
tax_code_id Reference Tax code applied to this line
account_id Reference Account used for this invoice
item_id Reference Item concerned by this line

POST https://api-connec.maestrano.com/api/v2/:group_id/quotes
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "quotes": {
        "due_date": "2014-12-05T08:13:31Z",
        "title": "Team meeting catering 12-01-2015",
        "status": "DRAFT",
        "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
        "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
        "lines: [
            {
                "id: "54b323b30202cbd6da000be5",
                "line_number": 1,
                "description: "Medium size pizza",
                "quantity: 6,
                "unit_price: {
                    "total_amount: 16.5,
                    "net_amount: 15.0,
                    "tax_amount: 1.5,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799",
                "item_id: "ddc285c1-5a96-0132-31b8-600308937d74"
            },
            {
                "id: "54b323b70202cbd6da000dbb",
                "line_number": 2,
                "description: "Mixed salad",
                "quantity: 2,
                "unit_price: {
                    "total_amount: 13.2,
                    "net_amount: 12.0,
                    "tax_amount: 1.2,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799"
            }
        ]
    }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
    "quotes": {
        "id": "e32303c1-5102-0132-661e-600308937d74",
        "group_id": "cld-4d7f86",
        "created_at": "2014-12-18T03:42:45Z",
        "updated_at": "2014-12-18T03:42:45Z",
        "due_date": "2014-12-05T08:13:31Z",
        "status": "DRAFT",
        "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
        "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
        "amount": {
            "total_amount": 125.4,
            "net_amount": 113.0,
            "tax_amount": 11.4,
            "tax_rate": 10.0,
            "currency": "USD"
        },
        "lines: [
            {
                "id: "line1",
                "line_number": 1,
                "description: "Medium size pizza",
                "quantity: 6,
                "unit_price: {
                    "total_amount: 16.5,
                    "net_amount: 15.0,
                    "tax_amount: 1.5,
                    "tax_rate: 10.0
                },
                "total_price: {
                    "total_amount: 99.0,
                    "net_amount: 90.0,
                    "tax_amount: 9.0,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799",
                "item_id: "ddc285c1-5a96-0132-31b8-600308937d74"
            },
            {
                "id: "line2",
                "line_number": 2,
                "description: "Mixed salad",
                "quantity: 2,
                "unit_price: {
                    "total_amount: 13.2,
                    "net_amount: 12.0,
                    "tax_amount: 1.2,
                    "tax_rate: 10.0
                },
                "total_price: {
                    "total_amount: 26.4,
                    "net_amount: 24.0,
                    "tax_amount: 2.4,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799"
            }
        ]
    }
}

Create New Quote
POST/api/v2/:group_id/quotes

Create a new quote.


Quote

GET https://api-connec.maestrano.com/api/v2/:group_id/quotes/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "quotes": {
    "id": "b3f169f0-5a96-0132-30de-600308937d74",
    "group_id": "cld-fd45gf12",
    "created_at": "2014-11-30T08:13:34Z",
    "updated_at": "2014-11-30T08:13:34Z",
    "transaction_number": "txn_00005",
    "transaction_date": "2014-11-30T08:13:31Z",
    "due_date": "2014-12-05T08:13:31Z",
    "status": "DRAFT",
    "discount_percent": 0,
    "discount_amount": 0,
    "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
    "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
    "amount": {
      "total_amount": 33,
      "net_amount": 30,
      "tax_amount": 3,
      "tax_rate": 10,
      "currency": "USD"
    },
    "billing_address": {
      "line1": "62 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2062",
      "country": "AU"
    },
    "shipping_address": {
      "line1": "64 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2064",
      "country": "AU"
    },
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 1,
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 10,
          "net_amount": 9,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      },
      {
        "id": "54b323b70202cbd6da000dbb",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 2,
        "status": "ACTIVE",
        "quantity": 2,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 22,
          "net_amount": 20,
          "tax_amount": 2,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Quote
GET/api/v2/:group_id/quotes/{id}

Get a single quote.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The quote ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/quotes/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "quotes": {
        "due_date": "2015-31-01T00:00:00Z",
        "status": "REJECTED",
        "lines: [
            {
                "id": "54b323b30202cbd6da000be5",
                "quantity": 6
            }
        }
    }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "quotes": {
    "id": "b3f169f0-5a96-0132-30de-600308937d74",
    "group_id": "cld-fd45gf12",
    "created_at": "2014-11-30T08:13:34Z",
    "updated_at": "2014-11-30T08:13:34Z",
    "transaction_number": "txn_00005",
    "transaction_date": "2014-11-30T08:13:31Z",
    "due_date": "2014-12-05T08:13:31Z",
    "status": "DRAFT",
    "discount_percent": 0,
    "discount_amount": 0,
    "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
    "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
    "amount": {
      "total_amount": 33,
      "net_amount": 30,
      "tax_amount": 3,
      "tax_rate": 10,
      "currency": "USD"
    },
    "billing_address": {
      "line1": "62 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2062",
      "country": "AU"
    },
    "shipping_address": {
      "line1": "64 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2064",
      "country": "AU"
    },
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 1,
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 10,
          "net_amount": 9,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      },
      {
        "id": "54b323b70202cbd6da000dbb",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 2,
        "status": "ACTIVE",
        "quantity": 2,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 22,
          "net_amount": 20,
          "tax_amount": 2,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Quote
PUT/api/v2/:group_id/quotes/{id}

Update a single Quote. For an quote line to be deleted, the status of the quote line must be set to “INACTIVE”

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The quote ID


Sales Orders

Business Rules

  • If a tax_code_id is specified for an sales_order line, the associated tax rate is used to calculate the total_price of the line

Sales Orders JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/sales_orders
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "invoices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Purchase Order UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "title": {
            "description": "Purchase Order friendly name",
            "type": "string"
          },
          "transaction_number": {
            "description": "Reference number of the Purchase Order",
            "type": "string"
          },
          "transaction_date": {
            "description": "Purchase Order creation date, defaults to today if not specified",
            "type": "date-time"
          },
          "due_date": {
            "description": "Purchase Order due date, defaults to today if not specified",
            "type": "date-time"
          },
          "status": {
            "description": "Purchase Order status",
            "enum": [
              "DRAFT",
              "SUBMITTED",
              "AUTHORISED",
              "PAID",
              "VOIDED",
              "INACTIVE"
            ],
            "default": "DRAFT"
          },
          "type": {
            "description": "Purchase Order type indicates if it is a sale order or a purchase order",
            "enum": [
              "CUSTOMER",
              "SUPPLIER"
            ],
            "default": "CUSTOMER"
          },
          "balance": {
            "description": "Amount left to be paid",
            "type": "number"
          },
          "deposit": {
            "description": "Amount paid to date",
            "type": "number"
          },
          "discount_percent": {
            "description": "Total discount percentage deducted on the purchase order total",
            "type": "number"
          },
          "discount_amount": {
            "description": "Fixed discount amount deducted on the purchase order total",
            "type": "number"
          },
          "public_note": {
            "description": "Note visible to the customer on the invoice",
            "type": "string"
          },
          "private_note": {
            "description": "Internal note not visible to the customer",
            "type": "string"
          },
          "organization_id": {
            "description": "Reference of the customer or supplier Organization",
            "type": "string"
          },
          "person_id": {
            "description": "Reference of the customer or supplier Person",
            "type": "string"
          },
          "warehouse_id": {
            "description": "Reference of the Warehouse to use for inventory management",
            "type": "string"
          },
          "billing_address": {
            "$ref": "#/definitions/address"
          },
          "shipping_address": {
            "$ref": "#/definitions/address"
          },
          "lines": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "Transaction line ID",
                    "type": "string"
                  },
                  "line_number": {
                    "description": "Transaction line number used for ordering",
                    "type": "integer"
                  },
                  "description": {
                    "description": "Transaction line description",
                    "type": "string"
                  },
                  "status": {
                    "description": "Transaction line status",
                    "enum": [
                      "ACTIVE",
                      "INACTIVE"
                    ],
                    "default": "ACTIVE"
                  },
                  "quantity": {
                    "description": "Quantity of Items",
                    "type": "number"
                  },
                  "reduction_percent": {
                    "description": "Reduction percentage applicable",
                    "type": "number"
                  },
                  "unit_price": {
                    "$ref": "#/definitions/price"
                  },
                  "total_price": {
                    "$ref": "#/definitions/price",
                    "readOnly": true
                  },
                  "service_date": {
                    "description": "Delivery date of the item/service",
                    "type": "string",
                    "format": "date-time"
                  },
                  "tax_code_id": {
                    "description": "Reference to the Tax Code applicable on the transaction line",
                    "type": "string"
                  },
                  "item_id": {
                    "description": "Reference to the Item of the transaction line",
                    "type": "string"
                  },
                  "account_id": {
                    "description": "Reference to the Account of the transaction line",
                    "type": "string"
                  },
                  "organization_id": {
                    "description": "Reference of the Customer or Supplier applicable to the transaction line",
                    "type": "string"
                  },
                  "payment_method_id": {
                    "description": "Reference to the Payment Method of the transaction line",
                    "type": "string"
                  },
                  "linked_transactions": {
                    "type": "array",
                    "items": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "description": "LinkedTransaction line ID",
                            "type": "string"
                          },
                          "applied_amount": {
                            "description": "Amount applied on the linked transaction",
                            "type": "number"
                          },
                          "transactionable_id": {
                            "description": "Reference to the Transaction UUID",
                            "type": "string"
                          },
                          "transactionable_type": {
                            "description": "Reference to the Transaction type (Invoice, Payment, CreditNote, etc...)",
                            "type": "string"
                          }
                        }
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/sales_orders

Attributes

Field Type Description
id String Purchase Order UUID
group_id String Group ID
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Unique code, auto-generated if not specified
title String Purchase Order friendly name
transaction_number String Reference number of the Purchase Order
transaction_date Date Time Purchase Order creation date, defaults to today if not specified
due_date Date Time Purchase Order due date, defaults to today if not specified
status Purchase Order status
type Purchase Order type indicates if it is a sale order or a purchase order
balance Number Amount left to be paid
deposit Number Amount paid to date
discount_percent Number Total discount percentage deducted on the purchase order total
discount_amount Number Fixed discount amount deducted on the purchase order total
public_note String Note visible to the customer on the invoice
private_note String Internal note not visible to the customer
organization_id String Reference of the customer or supplier Organization
person_id String Reference of the customer or supplier Person
warehouse_id String Reference of the Warehouse to use for inventory management
billing_address Address
shipping_address Address
lines Array
SalesOrders Lines attributes
Field Type Description
id String Transaction line ID
line_number Integer Transaction line number used for ordering
description String Transaction line description
status Transaction line status
quantity Number Quantity of Items
reduction_percent Number Reduction percentage applicable
unit_price Price
total_price Price
service_date Date Time Delivery date of the item/service
tax_code_id String Reference to the Tax Code applicable on the transaction line
item_id String Reference to the Item of the transaction line
account_id String Reference to the Account of the transaction line
organization_id String Reference of the Customer or Supplier applicable to the transaction line
payment_method_id String Reference to the Payment Method of the transaction line
linked_transactions Array
SalesOrders LinkedTransactions attributes
Field Type Description
id String LinkedTransaction line ID
applied_amount Number Amount applied on the linked transaction
transactionable_id String Reference to the Transaction UUID
transactionable_type String Reference to the Transaction type (Invoice, Payment, CreditNote, etc…)

SalesOrders List

GET https://api-connec.maestrano.com/sales_orders
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "sales_orders": [
    {
      "id": "b3f169f0-5a96-0132-30de-600308937d74",
      "group_id": "cld-fd45gf12",
      "created_at": "2014-11-30T08:13:34Z",
      "updated_at": "2014-11-30T08:13:34Z",
      "code": "171",
      "title": "Stationery supplies for 2015",
      "transaction_number": "SUP2015",
      "transaction_date": "2015-01-12T00:00:00Z",
      "due_date": "2015-01-31T00:00:00Z",
      "status": "DRAFT",
      "balance": 33,
      "deposit": 0,
      "discount_percent": 0,
      "discount_amount": 0,
      "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
      "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
      "quote_id": "qwd0c280-5a96-0132-30cd-600308937d43",
      "amount": {
        "total_amount": 33,
        "net_amount": 30,
        "tax_amount": 3,
        "tax_rate": 10,
        "currency": "USD"
      },
      "billing_address": {
        "line1": "210 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2000",
        "country": "AU"
      },
      "shipping_address": {
        "line1": "210 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2000",
        "country": "AU"
      },
      "lines": [
        {
          "id": "54b323b30202cbd6da000be5",
          "line_number": 1,
          "description": "2015 notebook",
          "status": "ACTIVE",
          "quantity": 10,
          "reduction_percent": 0,
          "service_date": "2015-01-27T08:13:34Z",
          "unit_price": {
            "total_amount": 1.1,
            "net_amount": 1,
            "tax_amount": 0.1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "total_price": {
            "total_amount": 11,
            "net_amount": 10,
            "tax_amount": 1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
          "account_id": "qwd88ac1-5a96-0132-30d1-600308937d32",
          "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
        },
        {
          "id": "54b323b70202cbd6da000dbb",
          "line_number": 2,
          "description": "2015 calendar A3 format",
          "status": "ACTIVE",
          "quantity": 2,
          "unit_price": {
            "total_amount": 11,
            "net_amount": 10,
            "tax_amount": 1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "total_price": {
            "total_amount": 22,
            "net_amount": 20,
            "tax_amount": 2,
            "tax_rate": 10,
            "currency": "USD"
          },
          "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
          "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74"
        }
      ]
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",

  "type": "object",
  "properties": {
    "sales_orders": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "SalesOrder UUID",
            "type": "string",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Unique code, auto-generated if not specified",
            "type": "string"
          },
          "title": {
            "description": "SalesOrder friendly name",
            "type": "string"
          },
          "transaction_number": {
            "description": "Reference number of the SalesOrder",
            "type": "string"
          },
          "transaction_date": {
            "description": "SalesOrder creation date",
            "type": "date-time"
          },
          "due_date": {
            "description": "SalesOrder due date",
            "type": "date-time"
          },
          "status": {
            "description": "SalesOrder status",
            "enum": ["DRAFT", "SUBMITTED", "AUTHORISED", "PAID", "VOIDED", "INACTIVE"],
            "default": "DRAFT"
          },
          "balance": {
            "description": "Amount left to be paid",
            "type": "number"
          },
          "deposit": {
            "description": "Amount paid to date",
            "type": "number"
          },
          "discount_percent": {
            "description": "Total discount percentage deducted on the sales_order total",
            "type": "number"
          },
          "discount_amount": {
            "description": "Fixed discount amount deducted on the sales_order total",
            "type": "number"
          },
          "organization_id": {
            "description": "Reference of the customer or supplier Organization",
            "type": "string"
          },
          "person_id": {
            "description": "Reference of the customer or supplier Person",
            "type": "string"
          },
          "quote_id": {
            "description": "Reference of parent Quote",
            "type": "string"
          },
          "public_note": {
            "description": "Note visible on the order",
            "type": "string"
          },
          "private_note": {
            "description": "Note not visible on the order",
            "type": "string"
          },
          "amount": {
            "$ref": "#/definitions/price",
            "readOnly": true
          },
          "billing_address": {
            "$ref": "#/definitions/address"
          },
          "shipping_address": {
            "$ref": "#/definitions/address"
          },
          "lines": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "SalesOrder line ID",
                    "type": "string"
                  },
                  "line_number": {
                    "description": "SalesOrder line number used for ordering",
                    "type": "integer"
                  },
                  "status": {
                    "description": "SalesOrder line status",
                    "enum": ["ACTIVE", "INACTIVE"],
                    "default": "ACTIVE"
                  },
                  "quantity": {
                    "description": "Quantity of Items",
                    "type": "number"
                  },
                  "reduction_percent": {
                    "description": "Reduction percentage applicable",
                    "type": "number"
                  },
                  "unit_price": {
                    "$ref": "#/definitions/price"
                  },
                  "total_price": {
                    "$ref": "#/definitions/price",
                    "readOnly": true
                  },
                  "service_date": {
                    "description": "Delivery date of the item/service",
                    "type": "string",
                    "format": "date-time"
                  },
                  "tax_code_id": {
                    "description": "Reference to the Tax Code applicable on the sales_order line",
                    "type": "string"
                  },
                  "item_id": {
                    "description": "Reference to the Item of the sales_order line",
                    "type": "string"
                  },
                  "account_id": {
                    "description": "Reference to the Account of the sales_order line",
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Get SalesOrders
GET/sales_orders

Get the list of sales_orders.

Attributes

Field Type Description
id String Sales order UUID
group_id String Group ID
created_at Date-time Sales order creation date
updated_at Date-time Sales order last update date
code String Code, auto-generated if not specified
status Enum [DRAFT, SUBMITTED, AUTHORISED, PAID, VOIDED, INACTIVE] - Default: DRAFT
title String Sales order title
transaction_number String Sales order number
transaction_date Date-time Sales order date
due_date Date-time Sales order due date
type Enum [CUSTOMER, SUPPLIER] - Default: CUSTOMER
deposit Number Sales order deposit
balance Number Sales order balance, calculated based on the purchase_order amount and deposit
discount_percent Number Total discount percentage deducted on the sales order total
discount_amount Number Total discount amount deducted on the sales order total
amount Price Sales order total amount, calculated based on the sales order lines
private_note String Private note not visible on the sales order
public_note String Public note visible on the sales order
organization_id Reference Sales order supplier/customer organization
person_id Reference Sales order supplier/customer contact
quote_id Reference Parent quote
billing_address Address Billing address
shipping_address Address Shipping address
lines Array Sales order details
Purchase order lines attributes
Field Type Description
id String Line id
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
line_number String Line number
description String Line description
reduction_percent Number Reduction percentage applicable
service_date Date-time Delivery date of the item/service
quantity Number Item quantity
unit_price Price Item unit price
total_price Price Line total price, calculated with unit_price and quantity
tax_code_id Reference Tax code applied to this line
account_id Reference Account used for this invoice
item_id Reference Item concerned by this line

POST https://api-connec.maestrano.com/sales_orders
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "sales_orders": {
        "due_date": "2014-12-05T08:13:31Z",
        "title": "Team meeting catering 12-01-2015",
        "status": "DRAFT",
        "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
        "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
        "lines: [
            {
                "id: "54b323b30202cbd6da000be5",
                "line_number": 1,
                "description: "Medium size pizza",
                "quantity: 6,
                "unit_price: {
                    "total_amount: 16.5,
                    "net_amount: 15.0,
                    "tax_amount: 1.5,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799",
                "item_id: "ddc285c1-5a96-0132-31b8-600308937d74"
            },
            {
                "id: "54b323b70202cbd6da000dbb",
                "line_number": 2,
                "description: "Mixed salad",
                "quantity: 2,
                "unit_price: {
                    "total_amount: 13.2,
                    "net_amount: 12.0,
                    "tax_amount: 1.2,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799"
            }
        ]
    }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
    "sales_orders": {
        "id": "e32303c1-5102-0132-661e-600308937d74",
        "group_id": "cld-4d7f86",
        "created_at": "2014-12-18T03:42:45Z",
        "updated_at": "2014-12-18T03:42:45Z",
        "due_date": "2014-12-05T08:13:31Z",
        "status": "DRAFT",
        "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
        "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
        "amount": {
            "total_amount": 125.4,
            "net_amount": 113.0,
            "tax_amount": 11.4,
            "tax_rate": 10.0,
            "currency": "USD"
        },
        "lines: [
            {
                "id: "line1",
                "line_number": 1,
                "description: "Medium size pizza",
                "quantity: 6,
                "unit_price: {
                    "total_amount: 16.5,
                    "net_amount: 15.0,
                    "tax_amount: 1.5,
                    "tax_rate: 10.0
                },
                "total_price: {
                    "total_amount: 99.0,
                    "net_amount: 90.0,
                    "tax_amount: 9.0,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799",
                "item_id: "ddc285c1-5a96-0132-31b8-600308937d74"
            },
            {
                "id: "line2",
                "line_number": 2,
                "description: "Mixed salad",
                "quantity: 2,
                "unit_price: {
                    "total_amount: 13.2,
                    "net_amount: 12.0,
                    "tax_amount: 1.2,
                    "tax_rate: 10.0
                },
                "total_price: {
                    "total_amount: 26.4,
                    "net_amount: 24.0,
                    "tax_amount: 2.4,
                    "tax_rate: 10.0
                },
                "tax_code_id: "75810aa1-7c28-0132-a5d9-56847afe9799"
            }
        ]
    }
}

Create New SalesOrder
POST/sales_orders

Create a new sales_order.


SalesOrder

GET https://api-connec.maestrano.com/sales_orders/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "sales_orders": {
    "id": "b3f169f0-5a96-0132-30de-600308937d74",
    "group_id": "cld-fd45gf12",
    "created_at": "2014-11-30T08:13:34Z",
    "updated_at": "2014-11-30T08:13:34Z",
    "transaction_number": "txn_00005",
    "transaction_date": "2014-11-30T08:13:31Z",
    "due_date": "2014-12-05T08:13:31Z",
    "status": "DRAFT",
    "balance": 26,
    "deposit": 0,
    "discount_percent": 0,
    "discount_amount": 0,
    "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
    "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
    "amount": {
      "total_amount": 33,
      "net_amount": 30,
      "tax_amount": 3,
      "tax_rate": 10,
      "currency": "USD"
    },
    "billing_address": {
      "line1": "62 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2062",
      "country": "AU"
    },
    "shipping_address": {
      "line1": "64 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2064",
      "country": "AU"
    },
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 1,
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 10,
          "net_amount": 9,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      },
      {
        "id": "54b323b70202cbd6da000dbb",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 2,
        "status": "ACTIVE",
        "quantity": 2,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 22,
          "net_amount": 20,
          "tax_amount": 2,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get SalesOrder
GET/sales_orders/{id}

Get a single sales_order.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The sales_order ID


PUT https://api-connec.maestrano.com/sales_orders/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "sales_orders": {
        "due_date": "2015-31-01T00:00:00Z",
        "status": "AUTHORIZED",
        "lines: [
            {
                "id": "54b323b30202cbd6da000be5",
                "quantity": 6
            }
        }
    }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "sales_orders": {
    "id": "b3f169f0-5a96-0132-30de-600308937d74",
    "group_id": "cld-fd45gf12",
    "created_at": "2014-11-30T08:13:34Z",
    "updated_at": "2014-11-30T08:13:34Z",
    "transaction_number": "txn_00005",
    "transaction_date": "2014-11-30T08:13:31Z",
    "due_date": "2014-12-05T08:13:31Z",
    "status": "DRAFT",
    "balance": 26,
    "deposit": 0,
    "discount_percent": 0,
    "discount_amount": 0,
    "organization_id": "b3ce0371-5a96-0132-30cb-600308937d74",
    "person_id": "b3d0c280-5a96-0132-30cd-600308937d74",
    "amount": {
      "total_amount": 33,
      "net_amount": 30,
      "tax_amount": 3,
      "tax_rate": 10,
      "currency": "USD"
    },
    "billing_address": {
      "line1": "62 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2062",
      "country": "AU"
    },
    "shipping_address": {
      "line1": "64 Elizabeth Street",
      "line2": "",
      "city": "Sydney",
      "region": "NSW",
      "postal_code": "2064",
      "country": "AU"
    },
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 1,
        "status": "ACTIVE",
        "quantity": 1,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 10,
          "net_amount": 9,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      },
      {
        "id": "54b323b70202cbd6da000dbb",
        "type": "ITEM_LINE_DETAIL",
        "line_number": 2,
        "status": "ACTIVE",
        "quantity": 2,
        "unit_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 22,
          "net_amount": 20,
          "tax_amount": 2,
          "tax_rate": 10,
          "currency": "USD"
        },
        "tax_code_id": "b3d88ac1-5a96-0132-30d1-600308937d74",
        "item_id": "b3d6dd11-5a96-0132-30cf-600308937d74"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an SalesOrder
PUT/sales_orders/{id}

Update a single SalesOrder. For an sales_order line to be deleted, the status of the sales_order line must be set to “INACTIVE”

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The sales_order ID


Stock Adjustments

StockAdjustment JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/stock_adjustments
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "stock_adjustments": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "StockAdjustment UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[DRAFT, SUBMITTED, AUTHORISED, INACTIVE, APPLIED, UNAPPLIED] - Default: DRAFT",
            "type": "string",
            "format": "enum"
          },
          "title": {
            "description": "StockAdjustment title",
            "type": "string"
          },
          "transaction_number": {
            "description": "Transaction reference",
            "type": "string"
          },
          "transaction_date": {
            "description": "Transaction date",
            "type": "string",
            "format": "date-time"
          },
          "public_note": {
            "description": "Note visible on the document",
            "type": "string"
          },
          "private_note": {
            "description": "Private internal note",
            "type": "string"
          },
          "amount": {
            "description": "StockAdjustment total amount, calculated with the lines",
            "$ref": "#/definitions/price",
            "readOnly": true
          },
          "lines": {
            "description": "Transaction details",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "required": [
                "quantity",
                "unit_price"
              ],
              "properties": {
                "id": {
                  "description": "Line id",
                  "type": "string"
                },
                "status": {
                  "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
                  "type": "string",
                  "format": "enum"
                },
                "line_number": {
                  "description": "Line number",
                  "type": "number"
                },
                "description": {
                  "description": "Line description",
                  "type": "string"
                },
                "quantity": {
                  "description": "Line quantity",
                  "type": "number"
                },
                "item_id": {
                  "description": "Reference to an Item UUID",
                  "type": "string"
                },
                "account_id": {
                  "description": "Reference to an Account UUID",
                  "type": "string"
                },
                "tax_code_id": {
                  "description": "Reference to a TaxCode UUID",
                  "type": "string"
                },
                "unit_price": {
                  "description": "Line unit price",
                  "$ref": "#/definitions/price"
                },
                "total_price": {
                  "description": "Line total price, calculated using unit_price and quantity",
                  "$ref": "#/definitions/price",
                  "readOnly": true
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/stock_adjustments

Attributes

Field Type Description
resource_type String Resource type name
id String StockAdjustment UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [DRAFT, SUBMITTED, AUTHORISED, INACTIVE, APPLIED, UNAPPLIED] - Default: DRAFT
title String StockAdjustment title
transaction_number String Transaction reference
transaction_date Date Time Transaction date
public_note String Note visible on the document
private_note String Private internal note
amount Price StockAdjustment total amount, calculated with the lines
lines Array Transaction details
StockAdjustments Lines attributes
Field Type Description
id String Line id
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
line_number Number Line number
description String Line description
quantity Number Line quantity
item_id String Reference to an Item UUID
account_id String Reference to an Account UUID
tax_code_id String Reference to a TaxCode UUID
unit_price Price Line unit price
total_price Price Line total price, calculated using unit_price and quantity

StockAdjustments List

GET https://api-connec.maestrano.com/api/v2/:group_id/stock_adjustments
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "stock_adjustments": [
    {
      "id": "b3f169f0-5a96-0132-30de-600308937d74",
      "group_id": "cld-fd45gf12",
      "created_at": "2014-11-30T08:13:34Z",
      "updated_at": "2014-11-30T08:13:34Z",
      "code": "SA11",
      "title": "Adjusting stocks",
      "transaction_number": "ABC2015",
      "transaction_date": "2015-01-12T00:00:00Z",
      "status": "DRAFT",
      "public_note": "Public note",
      "private_note": "Private note",
      "amount": {
        "total_amount": 33,
        "net_amount": 30,
        "tax_amount": 3,
        "tax_rate": 10,
        "currency": "USD"
      },
      "lines": [
        {
          "id": "54b323b30202cbd6da000be5",
          "line_number": 1,
          "description": "2015 notebook",
          "status": "ACTIVE",
          "quantity": 10,
          "unit_price": {
            "total_amount": 1.1,
            "net_amount": 1,
            "tax_amount": 0.1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "total_price": {
            "total_amount": 11,
            "net_amount": 10,
            "tax_amount": 1,
            "tax_rate": 10,
            "currency": "USD"
          },
          "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
        }
      ]
    }
  ]
}

Get StockAdjustments
GET/api/v2/:group_id/stock_adjustments

Get the list of stock adjustments.


POST https://api-connec.maestrano.com/api/v2/:group_id/stock_adjustments
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "stock_adjustments": {
    "title": "Adjusting stuff",
    "status": "DRAFT",
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "line_number": 1,
        "description": "Medium size pizza",
        "quantity": 6,
        "unit_price": {
          "total_amount": 16.5,
          "net_amount": 15,
          "tax_amount": 1.5,
          "tax_rate": 10
        },
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      }
    ]
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "stock_adjustments": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "status": "DRAFT",
    "amount": {
      "total_amount": 125.4,
      "net_amount": 113,
      "tax_amount": 11.4,
      "tax_rate": 10,
      "currency": "USD"
    },
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "line_number": 1,
        "description": "Medium size pizza",
        "quantity": 6,
        "unit_price": {
          "total_amount": 16.5,
          "net_amount": 15,
          "tax_amount": 1.5,
          "tax_rate": 10
        },
        "total_price": {
          "total_amount": 99,
          "net_amount": 90,
          "tax_amount": 9,
          "tax_rate": 10
        },
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      }
    ]
  }
}

Create New StockAdjustments
POST/api/v2/:group_id/stock_adjustments

Create a new stock adjustment.


StockAdjustment

GET https://api-connec.maestrano.com/api/v2/:group_id/stock_adjustments/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "stock_adjustments": {
    "id": "b3f169f0-5a96-0132-30de-600308937d74",
    "group_id": "cld-fd45gf12",
    "created_at": "2014-11-30T08:13:34Z",
    "updated_at": "2014-11-30T08:13:34Z",
    "code": "SA11",
    "title": "Adjusting stocks",
    "transaction_number": "ABC2015",
    "transaction_date": "2015-01-12T00:00:00Z",
    "status": "DRAFT",
    "public_note": "Public note",
    "private_note": "Private note",
    "amount": {
      "total_amount": 33,
      "net_amount": 30,
      "tax_amount": 3,
      "tax_rate": 10,
      "currency": "USD"
    },
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "line_number": 1,
        "description": "2015 notebook",
        "status": "ACTIVE",
        "quantity": 10,
        "unit_price": {
          "total_amount": 1.1,
          "net_amount": 1,
          "tax_amount": 0.1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get StockAdjustment
GET/api/v2/:group_id/stock_adjustments/{id}

Get a single stock adjustment.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The stock adjustment ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/stock_adjustments/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "stock_adjustments": {
        "due_date": "2015-31-01T00:00:00Z",
        "status": "AUTHORIZED",
        "lines": [
            {
                "id": "54b323b30202cbd6da000be5",
                "quantity": 6
            }
        }
    }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "stock_adjustments": {
    "id": "b3f169f0-5a96-0132-30de-600308937d74",
    "group_id": "cld-fd45gf12",
    "created_at": "2014-11-30T08:13:34Z",
    "updated_at": "2014-11-30T08:13:34Z",
    "code": "SA11",
    "title": "Adjusting stocks",
    "transaction_number": "ABC2015",
    "transaction_date": "2015-01-12T00:00:00Z",
    "status": "DRAFT",
    "public_note": "Public note",
    "private_note": "Private note",
    "amount": {
      "total_amount": 33,
      "net_amount": 30,
      "tax_amount": 3,
      "tax_rate": 10,
      "currency": "USD"
    },
    "lines": [
      {
        "id": "54b323b30202cbd6da000be5",
        "line_number": 1,
        "description": "2015 notebook",
        "status": "ACTIVE",
        "quantity": 10,
        "unit_price": {
          "total_amount": 1.1,
          "net_amount": 1,
          "tax_amount": 0.1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "total_price": {
          "total_amount": 11,
          "net_amount": 10,
          "tax_amount": 1,
          "tax_rate": 10,
          "currency": "USD"
        },
        "item_id": "b3d52f61-5a96-0132-30ce-600308937d74"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a StockAdjustment
PUT/api/v2/:group_id/stock_adjustments/{id}

Update a single stock adjustment. For an stock adjustment line to be deleted, the status of the stock adjustment line must be set to “INACTIVE”

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The stock adjustment ID


Tag References

Tag References List

GET https://api-connec.maestrano.com/api/v2/:group_id/tag_references
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "tag_references": [
    {
      "id": "5f7b97e0-ec38-0134-4a09-0021cc6899a1",
      "name": "Region",
      "status": "ACTIVE",
      "tag_reference_values": [
        {
          "id": "58ca2445bd44784f884f5820",
          "value": "Eastside"
        },
        {
          "id": "58ca2445bd44784f884f5822",
          "value": "North"
        },
        {
          "id": "58ca2445bd44784f884f5824",
          "value": "South"
        },
        {
          "id": "58ca2445bd44784f884f5826",
          "value": "West Coast"
        }
      ],
      "created_at": "2017-03-19T09:24:35Z",
      "updated_at": "2017-03-19T09:24:35Z",
      "group_id": "org-fb6k",
      "channel_id": "org-fb6k",
      "resource_type": "tag_references"
    },
    {
      "id": "600b31c0-ec38-0134-4a11-0021cc6899a1",
      "name": "Department",
      "status": "ACTIVE",
      "tag_reference_values": [
        {
          "id": "58ca2446bd44784f884f5833",
          "value": "Engineering"
        },
        {
          "id": "58ca2446bd44784f884f5835",
          "value": "Marketing"
        },
        {
          "id": "58ca2446bd44784f884f5837",
          "value": "Sales"
        }
      ],
      "created_at": "2017-03-19T09:24:35Z",
      "updated_at": "2017-03-19T09:24:35Z",
      "group_id": "org-fb6k",
      "channel_id": "org-fb6k",
      "resource_type": "tag_references"
    }
  ],
  "pagination": {
    "skip": 0,
    "top": 100,
    "total": 2
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "tag_references": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Tag Reference UUID",
            "type": "string",
            "readOnly": true
          },
          "Name": {
            "description": "Tag category name",
            "type": "string"
          },
          "status": {
            "description": "Tag Reference status",
            "enum": [
              "ACTIVE",
              "INACTIVE"
            ],
            "default": "ACTIVE"
          },
          "group_id": {
            "description": "Group ID",
            "type": "string"
          },
          "channel_id": {
            "description": "Channel ID (org-xxxx)",
            "type": "string"
          },
          "ressource_type": {
            "description": "Rype of the resource (tag_references here)",
            "type": "string"
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "tag_reference_values": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "Tag Reference value ID",
                  "type": "string"
                },
                "value": {
                  "description": "Tag value",
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}

Get Tag References
GET/api/v2/:group_id/tag_references

Get the list of Tag References.

Attributes

Field Type Description
id String Tag reference UUID
name String Category Name
group_id String Group ID
created_at Date-time Creation date
updated_at Date-time Last update date
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
tag_reference_values Array Tag values
Tag Reference Values attributes
Field Type Description
id String Tag reference value line id
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
value String Tag Value

POST https://api-connec.maestrano.com/api/v2/:group_id/tag_references
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "tag_references": {
    "name": "Tag Category",
    "status": "ACTIVE",
    "tag_reference_values": [
      {
        "id": "58aa83f9bd44787bffb28acc",
        "value": "Eastside",
        "status": "ACTIVE"
      },
      {
        "id": "58aa83fabd44787bffb28ace",
        "value": "North",
        "status": "ACTIVE"
      },
      {
        "id": "58aa83fabd44787bffb28ad0",
        "value": "South",
        "status": "ACTIVE"
      },
      {
        "id": "58aa83fabd44787bffb28ad2",
        "value": "West Coast",
        "status": "ACTIVE"
      }
    ]
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "tag_references": {
    "id": "c2f56490-f1b9-0134-49e0-0021cc6899a1",
    "name": "Tag Category",
    "status": "ACTIVE",
    "tag_reference_values": [
      {
        "id": "58aa83f9bd44787bffb28acc",
        "value": "Eastside",
        "status": "ACTIVE"
      },
      {
        "id": "58aa83fabd44787bffb28ace",
        "value": "North",
        "status": "ACTIVE"
      },
      {
        "id": "58aa83fabd44787bffb28ad0",
        "value": "South",
        "status": "ACTIVE"
      },
      {
        "id": "58aa83fabd44787bffb28ad2",
        "value": "West Coast",
        "status": "ACTIVE"
      }
    ],
    "created_at": "2017-03-23T05:44:53Z",
    "updated_at": "2017-03-23T05:44:53Z",
    "group_id": "org-fbbj",
    "channel_id": "org-fbbj",
    "resource_type": "tag_references"
  }
}

Create New Tag Reference
POST/api/v2/:group_id/tag_references

Create a new tag Reference.


Tag Reference

GET https://api-connec.maestrano.com/api/v2/:group_id/tag_references/9a485490-d95e-0134-3259-0021cc6899a1
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "tag_references": {
    "id": "9a485490-d95e-0134-3259-0021cc6899a1",
    "name": "Region",
    "status": "ACTIVE",
    "tag_reference_values": [
      {
        "id": "58aa83f9bd44787bffb28acc",
        "value": "Eastside",
        "status": "ACTIVE"
      },
      {
        "id": "58aa83fabd44787bffb28ace",
        "value": "North",
        "status": "ACTIVE"
      },
      {
        "id": "58aa83fabd44787bffb28ad0",
        "value": "South",
        "status": "ACTIVE"
      },
      {
        "id": "58aa83fabd44787bffb28ad2",
        "value": "West Coast",
        "status": "ACTIVE"
      }
    ],
    "created_at": "2017-02-20T05:51:54Z",
    "updated_at": "2017-02-20T05:51:54Z",
    "group_id": "org-fbbj",
    "channel_id": "org-fbbj",
    "resource_type": "tag_references"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "9a485490-d95e-0134-3259-0021cc6899a1",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Tag Reference
GET/api/v2/:group_id/tag_references/{id}

Get a single Tag Reference.

URI Parameters
HideShow
id
string (required) Example: 9a485490-d95e-0134-3259-0021cc6899a1

The Tag reference ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/tag_references/9a485490-d95e-0134-3259-0021cc6899a1
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "tag_references": {
    "status": "INACTIVE"
  }
}
Responses200404
Body
{
  "tag_references": {
    "id": "9a485490-d95e-0134-3259-0021cc6899a1",
    "name": "Region",
    "status": "INACTIVE",
    "tag_reference_values": [
      {
        "id": "58aa83f9bd44787bffb28acc",
        "value": "Eastside",
        "status": "ACTIVE"
      },
      {
        "id": "58aa83fabd44787bffb28ace",
        "value": "North",
        "status": "ACTIVE"
      },
      {
        "id": "58aa83fabd44787bffb28ad0",
        "value": "South",
        "status": "ACTIVE"
      },
      {
        "id": "58aa83fabd44787bffb28ad2",
        "value": "West Coast",
        "status": "ACTIVE"
      }
    ],
    "created_at": "2017-02-20T05:51:54Z",
    "updated_at": "2017-02-20T05:51:54Z",
    "group_id": "org-fbbj",
    "channel_id": "org-fbbj",
    "resource_type": "tag_references"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "9a485490-d95e-0134-3259-0021cc6899a1",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a Tag Reference
PUT/api/v2/:group_id/tag_references/{id}

Update a Tag Reference.

URI Parameters
HideShow
id
string (required) Example: 9a485490-d95e-0134-3259-0021cc6899a1

The Tag reference ID


Tasks

Tasks JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/tasks
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "tasks": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Task UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "name": {
            "description": "Task name",
            "type": "string"
          },
          "description": {
            "description": "Task description",
            "type": "string"
          },
          "status": {
            "description": "[READY, ASSIGNED, TERMINATED, EXPIRED, FORWARDED, FINISHED, FAILEDD]",
            "type": "string",
            "format": "enum"
          },
          "position": {
            "description": "Task position in the task list",
            "type": "number"
          },
          "priority": {
            "description": "[HIGH, MEDIUM, LOW]",
            "type": "string",
            "format": "enum"
          },
          "completion": {
            "description": "Task completion percentage",
            "type": "number"
          },
          "start_date": {
            "description": "Task start date",
            "type": "string",
            "format": "date-time"
          },
          "due_date": {
            "description": "Task end date",
            "type": "string",
            "format": "date-time"
          },
          "completed_date": {
            "description": "Task completion date",
            "type": "string",
            "format": "date-time"
          },
          "task_list_id": {
            "description": "#TaskList the task belongs to",
            "type": "string",
            "format": "reference"
          },
          "work_location_id": {
            "description": "#WorkLocation the task is done in",
            "type": "string",
            "format": "reference"
          },
          "dependencies": {
            "description": "Dependencies affecting this task",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "Dependency ID",
                  "type": "string"
                },
                "type": {
                  "description": "[STARTTOSTART, STARTTOFINISH, FINISHTOSTART, FINISHTOFINISH]",
                  "type": "string",
                  "format": "enum"
                },
                "status": {
                  "description": "[READY, ASSIGNED, TERMINATED, EXPIRED, FORWARDED, FINISHED, FAILED]",
                  "type": "string",
                  "format": "enum"
                },
                "previous_task_id": {
                  "description": "Previous #task",
                  "type": "string",
                  "format": "reference"
                },
                "next_task_id": {
                  "description": "Next #task",
                  "type": "string",
                  "format": "reference"
                }
              }
            }
          },
          "time_logs": {
            "description": "Time logged on this task",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "TimeLog id",
                  "type": "string"
                },
                "duration": {
                  "description": "TimeLog duration",
                  "type": "number"
                },
                "unit": {
                  "description": "TimeLog duration unit [MINUTE, HOUR, DAY]",
                  "type": "string",
                  "format": "enum"
                },
                "comment": {
                  "description": "TimeLog comment",
                  "type": "string"
                },
                "start_date": {
                  "description": "Project start date",
                  "type": "string",
                  "format": "date-time"
                },
                "app_user_id": {
                  "description": "#AppUser logging this time",
                  "type": "string",
                  "format": "reference"
                },
                "organization_id": {
                  "description": "#Organization logging this time",
                  "type": "string",
                  "format": "reference"
                },
                "person_id": {
                  "description": "#Person logging this time",
                  "type": "string",
                  "format": "reference"
                }
              }
            }
          },
          "assignees": {
            "description": "Assignees working on this task",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "Assignee id",
                  "type": "string"
                },
                "role": {
                  "description": "Role on the task [OWNER, SUPERVISOR, RESPONSIBLE, PARTICIPANT]",
                  "type": "string",
                  "format": "enum"
                },
                "status": {
                  "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
                  "type": "string",
                  "format": "enum"
                },
                "rights": {
                  "description": "[ALL, READ, WRITE, APPROVER]",
                  "type": "string",
                  "format": "enum"
                },
                "team_id": {
                  "description": "#Team representing this assignee",
                  "type": "string",
                  "format": "reference"
                },
                "app_user_id": {
                  "description": "#AppUser representing this assignee",
                  "type": "string",
                  "format": "reference"
                },
                "organization_id": {
                  "description": "#Organization representing this assignee",
                  "type": "string",
                  "format": "reference"
                },
                "person_id": {
                  "description": "#Person representing this assignee",
                  "type": "string",
                  "format": "reference"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/tasks

Attributes

Field Type Description
resource_type String Resource type name
id String Task UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
name String Task name
description String Task description
status Enum [READY, ASSIGNED, TERMINATED, EXPIRED, FORWARDED, FINISHED, FAILEDD]
position Number Task position in the task list
priority Enum [HIGH, MEDIUM, LOW]
completion Number Task completion percentage
start_date Date Time Task start date
due_date Date Time Task end date
completed_date Date Time Task completion date
task_list_id Reference TaskList the task belongs to
work_location_id Reference WorkLocation the task is done in
dependencies Array Dependencies affecting this task
time_logs Array Time logged on this task
assignees Array Assignees working on this task
Tasks Dependencies attributes
Field Type Description
id String Dependency ID
type Enum [STARTTOSTART, STARTTOFINISH, FINISHTOSTART, FINISHTOFINISH]
status Enum [READY, ASSIGNED, TERMINATED, EXPIRED, FORWARDED, FINISHED, FAILED]
previous_task_id Reference Previous task
next_task_id Reference Next task
Tasks TimeLogs attributes
Field Type Description
id String TimeLog id
duration Number TimeLog duration
unit Enum TimeLog duration unit [MINUTE, HOUR, DAY]
comment String TimeLog comment
start_date Date Time Project start date
app_user_id Reference AppUser logging this time
organization_id Reference Organization logging this time
person_id Reference Person logging this time
Tasks Assignees attributes
Field Type Description
id String Assignee id
role Enum Role on the task [OWNER, SUPERVISOR, RESPONSIBLE, PARTICIPANT]
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
rights Enum [ALL, READ, WRITE, APPROVER]
team_id Reference Team representing this assignee
app_user_id Reference AppUser representing this assignee
organization_id Reference Organization representing this assignee
person_id Reference Person representing this assignee

Tasks List

GET https://api-connec.maestrano.com/api/v2/:group_id/tasks
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "tasks" : [
    {
      "id": "5724bcf1-5103-0132-6651-600308937d74",
      "group_id": "cld-7gr8e5",
      "created_at": "2014-11-18T03:45:59Z",
      "updated_at": "2015-01-11T03:45:59Z",
      "name": "Prepare design review with stakeholders",
      "description": "Design need to be approved by committee",
      "position": 5,
      "status": "COMPLETED",
      "priority": "HIGH",
      "completion": 100,
      "start_date": "2015-09-23",
      "due_date": "2015-09-25",
      "completed_date": "2015-09-25",
      "task_list_id": "5724bdd1-5453-0132-6651-600308937d74",
      "work_location_id": "3498bdd1-5453-0132-6651-600308937q22",
      "dependencies": [
        {
          "id": "561cf41273673ae8be000003",
          "type": "STARTTOFINISH",
          "status": "ASSIGNED",
          "previous_task_id": "d92a69c1-53cd-0133-9e69-062f2dc812d3",
          "next_task_id": "2114bcf1-5103-1243-6651-600308937s71",
        },
        {
          "id": "54b323b701a3cbd6da000cb5",
          "type": "STARTTOFINISH",
          "previous_task_id": "d92a69c1-53cd-0133-9e69-062f2dc812d3",
          "next_task_id": "5724bcf1-5103-1243-6651-600308937d74",
        }
      ],
      "time_logs": [
        {
          "id": "561cf47d73673ae8be000005",
          "duration": 80,
          "unit": "DAY",
          "comment": "work has been completed by development team",
          "start_date": "2015-02-02T00:00:00Z"
        },
        {
          "id": "561cf4cd73673ae8be000007",
          "duration": 40,
          "unit": "HOUR",
          "comment": "design bug fixes",
          "start_date": "2015-03-16T00:00:00Z"
        }
      ],
      "assignees": [
        {
          "id": "561cedef73673a5bbb0000a1",
          "role": 'SUPERVISOR',
          "rights": 'ALL',
          "status": 'ACTIVE',
          "app_user_id": "5724bdd1-5453-0132-6651-6003089sdfsdf",
          "team_id": "5724bdd1-5453-0132-6741-6003089sdfsdf"
        },
        {
          "id": "2432hknjbkliu4oh32jnk",
          "role": 'PARTICIPANT',
          "rights": 'WRITE',
          "status": 'ACTIVE',
          "person_id": "1124bdd1-5453-0132-6651-6003089sdfsdz",
          "organization_id": "1124bdd1-5453-0132-6741-6003089sdfsqw"
        }
      ]
    }
  ]
}

Get Tasks
GET/api/v2/:group_id/tasks

Get the list of tasks.


POST https://api-connec.maestrano.com/api/v2/:group_id/tasks
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "tasks": {
    "name": "Rewrite doc"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "tasks": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "name": "Rewrite doc"
  }
}

Create New Task
POST/api/v2/:group_id/tasks

Create a new task.


Task

GET https://api-connec.maestrano.com/api/v2/:group_id/tasks/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  {
    "id": "5724bcf1-5103-0132-6651-600308937d74",
    "group_id": "cld-7gr8e5",
    "created_at": "2014-11-18T03:45:59Z",
    "updated_at": "2015-01-11T03:45:59Z",
    "name": "Water the plants",
    "description": "No more than 12L per plant. Add coffee when needed",
    "position": 5,
    "status": "COMPLETED",
    "priority": "HIGH",
    "start_date": "2014-11-20T09:00:00Z",
    "due_date": "2014-12-20T18:00:00Z",
    "completed_date": "2014-12-19T15:00:00Z",
    "task_list_id": "5724bdd1-5453-0132-6651-600308937d74",
    "dependencies": [
      {
        "id": "54b323b70202cbd6da000dbb",
        "type": "STARTTOSTART",
        "next_task_id": "5724bcf1-5103-1243-6651-600308937d74"
      },
      {
        "id": "54b323b701a3cbd6da000cb5",
        "type": "STARTTOFINISH",
        "previous_task_id": "d92a69c1-53cd-0133-9e69-062f2dc812d3",
        "next_task_id": "5724bcf1-5103-1243-6651-600308937d74",
      }
    ],
    "time_logs": [
      {
        "id": "561cedef73673ae4bb000007",
        "duration": 120,
        "comment": "Rewrite some stuff",
        "start_date": "2014-11-22T12:45:00Z",
        "app_user_id": "5724bdd1-5453-0132-6651-6003089sdfsdf"
      }
    ],
    "assignees": [
      {
        "id": "561cedef73673a5bbb0000a1",
        "role": 'SUPERVISOR',
        "rights": 'ALL',
        "status": 'ACTIVE',
        "user": "5724bdd1-5453-0132-6651-6003089sdfsdf",
        "team": "5724bdd1-5453-0132-6741-6003089sdfsdf"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Task
GET/api/v2/:group_id/tasks/{id}

Get a single task.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The task ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/tasks/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "tasks": {
    "status": "COMPLETED"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  {
    "id": "5724bcf1-5103-0132-6651-600308937d74",
    "group_id": "cld-7gr8e5",
    "created_at": "2014-11-18T03:45:59Z",
    "updated_at": "2015-01-11T03:45:59Z",
    "name": "Water the plants",
    "description": "No more than 12L per plant. Add coffee when needed",
    "position": 5,
    "status": "COMPLETED",
    "priority": "HIGH",
    "start_date": "2014-11-20T09:00:00Z",
    "due_date": "2014-12-20T18:00:00Z",
    "completed_date": "2014-12-19T15:00:00Z",
    "task_list_id": "5724bdd1-5453-0132-6651-600308937d74",
    "dependencies": [
      {
        "id": "54b323b70202cbd6da000dbb",
        "type": "STARTTOSTART",
        "next_task_id": "5724bcf1-5103-1243-6651-600308937d74"
      },
      {
        "id": "54b323b701a3cbd6da000cb5",
        "type": "STARTTOFINISH",
        "previous_task_id": "d92a69c1-53cd-0133-9e69-062f2dc812d3",
        "next_task_id": "5724bcf1-5103-1243-6651-600308937d74",
      }
    ],
    "time_logs": [
      {
        "id": "561cedef73673ae4bb000007",
        "duration": 120,
        "comment": "Rewrite some stuff",
        "start_date": "2014-11-22T12:45:00Z",
        "app_user_id": "5724bdd1-5453-0132-6651-6003089sdfsdf"
      }
    ],
    "assignees": [
      {
        "id": "561cedef73673a5bbb0000a1",
        "role": 'SUPERVISOR',
        "rights": 'ALL',
        "status": 'ACTIVE',
        "user": "5724bdd1-5453-0132-6651-6003089sdfsdf",
        "team": "5724bdd1-5453-0132-6741-6003089sdfsdf"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a Task
PUT/api/v2/:group_id/tasks/{id}

Update a single Task

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The task ID


Task Lists

Task Lists JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/task_lists
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "task_lists": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "TaskList UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "name": {
            "description": "Task list name",
            "type": "string"
          },
          "description": {
            "description": "Task list description",
            "type": "string"
          },
          "status": {
            "description": "[DRAFT STARTED COMPLETED ARCHIVED CANCELED]",
            "type": "string",
            "format": "enum"
          },
          "priority": {
            "description": "[HIGH, MEDIUM, LOW]",
            "type": "string",
            "format": "enum"
          },
          "start_date": {
            "description": "Task start date",
            "type": "string",
            "format": "date-time"
          },
          "due_date": {
            "description": "Task end date",
            "type": "string",
            "format": "date-time"
          },
          "completed_date": {
            "description": "Task completion date",
            "type": "string",
            "format": "date-time"
          },
          "milestone_id": {
            "description": "#Milestone this task list belongs to",
            "type": "string"
          },
          "tasks": {
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "#Task reference UID",
                  "type": "string",
                  "format": "reference"
                }
              }
            }
          },
          "assignees": {
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "Assignee ID",
                  "type": "string"
                },
                "role": {
                  "description": "Role on the task [OWNER, SUPERVISOR, RESPONSIBLE, PARTICIPANT]",
                  "type": "string",
                  "format": "enum"
                },
                "status": {
                  "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
                  "type": "string",
                  "format": "enum"
                },
                "rights": {
                  "description": "[ALL, READ, WRITE, APPROVER]",
                  "type": "string",
                  "format": "enum"
                },
                "team_id": {
                  "description": "#Team representing this assignee",
                  "type": "string",
                  "format": "reference"
                },
                "app_user_id": {
                  "description": "#AppUser representing this assignee",
                  "type": "string",
                  "format": "reference"
                },
                "organization_id": {
                  "description": "#Organization representing this assignee",
                  "type": "string",
                  "format": "reference"
                },
                "person_id": {
                  "description": "#Person representing this assignee",
                  "type": "string",
                  "format": "reference"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/task_lists

Attributes

Field Type Description
resource_type String Resource type name
id String TaskList UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
name String Task list name
description String Task list description
status Enum [DRAFT STARTED COMPLETED ARCHIVED CANCELED]
priority Enum [HIGH, MEDIUM, LOW]
start_date Date Time Task start date
due_date Date Time Task end date
completed_date Date Time Task completion date
milestone_id String Milestone this task list belongs to
tasks Array
assignees Array
TaskLists Tasks attributes
Field Type Description
id Reference Task reference UID
TaskLists Assignees attributes
Field Type Description
id String Assignee ID
role Enum Role on the task [OWNER, SUPERVISOR, RESPONSIBLE, PARTICIPANT]
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
rights Enum [ALL, READ, WRITE, APPROVER]
team_id Reference Team representing this assignee
app_user_id Reference AppUser representing this assignee
organization_id Reference Organization representing this assignee
person_id Reference Person representing this assignee

Task Lists List

GET https://api-connec.maestrano.com/api/v2/:group_id/task_lists
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "task_lists" : [
    {
      "id": "3c0e9671-53d2-0133-9e6b-062f2dc812d3",
      "code": "TL52934",
      "name": "Website design first quarter tasks",
      "description": "list of tasks for the website redesign from 01/2015 to 03/2015",
      "status": "STARTED",
      "priority": "HIGH",
      "start_date": "2015-01-01",
      "due_date": "2015-03-31",
      "milestone_id": "8b2672b1-53cc-0133-9e67-062f2dc812d3",
      "completed_date": nil,
      "tasks": [
        {
          "id": "ddbb0e11-53d0-0133-9e6a-062f2dc812d3"
        },
        {
          "id": "d92a69c1-53cd-0133-9e69-062f2dc812d3"
        }
      ],
      "assignees": [
        {
          "id": "561cf6bc73673ae8be00000f",
          "role": "REPONSIBLE",
          "rights": "ALL",
          "status": "ACTIVE",
          "app_user_id": "a2b76d01-4f88-0133-c32e-062f2dc812d3",
          "team_id": "w3b76d01-4f88-0133-c32e-062f2dc812a1"
        },
        {
          "id": "456cf6bc73673ae8be00099e",
          "role": "OWNER",
          "rights": "ALL",
          "status": "ACTIVE",
          "person_id": "e3b76d01-4f88-0133-c32e-062f2dc812d3",
          "organization_id": "x9b76d01-4f88-0133-c32e-062f2dc812a1"
        }
      ],
      "created_at": "2015-10-13T12:17:02Z",
      "updated_at": "2015-10-13T12:17:02Z",
      "channel_id": "org-fblp",
      "resource_type": "task_lists"
    }
  ]
}

Get Task Lists
GET/api/v2/:group_id/task_lists

Get the list of task lists.


POST https://api-connec.maestrano.com/api/v2/:group_id/task_lists
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "task_lists": {
    "name": "Update doc"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "task_lists": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "name": "Update doc"
  }
}

Create New Task
POST/api/v2/:group_id/task_lists

Create a new task list.


Task List

GET https://api-connec.maestrano.com/api/v2/:group_id/task_lists/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  {
    "id": "3c0e9671-53d2-0133-9e6b-062f2dc812d3",
    "code": "TL52934",
    "name": "Website design first quarter tasks",
    "description": "list of tasks for the website redesign from 01/2015 to 03/2015",
    "status": "STARTED",
    "priority": "HIGH",
    "start_date": "2015-01-01",
    "due_date": "2015-03-31",
    "completed_date": nil,
    "tasks": [
      {
        "id": "ddbb0e11-53d0-0133-9e6a-062f2dc812d3"
      },
      {
        "id": "d92a69c1-53cd-0133-9e69-062f2dc812d3"
      }
    ],
    "assignees": [
      {
        "id": "561cf6bc73673ae8be00000f",
        "role": "REPONSIBLE",
        "status": "ACTIVE",
        "app_user_id": "a2b76d01-4f88-0133-c32e-062f2dc812d3",
        "team_id": "w3b76d01-4f88-0133-c32e-062f2dc812a1"
      },
      {
        "id": "456cf6bc73673ae8be00099e",
        "role": "OWNER",
        "status": "ACTIVE",
        "person_id": "e3b76d01-4f88-0133-c32e-062f2dc812d3",
        "organization_id": "x9b76d01-4f88-0133-c32e-062f2dc812a1"
      }
    ],
    "created_at": "2015-10-13T12:17:02Z",
    "updated_at": "2015-10-13T12:17:02Z",
    "channel_id": "org-fblp",
    "resource_type": "task_lists"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Task List
GET/api/v2/:group_id/task_lists/{id}

Get a single task list.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The task_list ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/task_lists/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "task_lists": {
    "status": "COMPLETED"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  {
    "id": "5724bcf1-5103-0132-6651-600308937d74",
    "group_id": "cld-7gr8e5",
    "created_at": "2014-11-18T03:45:59Z",
    "updated_at": "2015-01-11T03:45:59Z",
    "name": "Water the plants",
    "description": "No more than 12L per plant. Add coffee when needed",
    "position": 5,
    "status": "COMPLETED",
    "priority": "HIGH",
    "start_date": "2014-11-20T09:00:00Z",
    "due_date": "2014-12-20T18:00:00Z",
    "completed_date": "2014-12-19T15:00:00Z",
    "task_list_id": "5724bdd1-5453-0132-6651-600308937d74",
    "dependencies": [
      {
        "id": "54b323b70202cbd6da000dbb",
        "type": "STARTTOSTART",
        "next_task_id": "5724bcf1-5103-1243-6651-600308937d74"
      },
      {
        "id": "54b323b701a3cbd6da000cb5",
        "type": "STARTTOFINISH",
        "previous_task_id": "d92a69c1-53cd-0133-9e69-062f2dc812d3",
        "next_task_id": "5724bcf1-5103-1243-6651-600308937d74",
      }
    ],
    "time_logs": [
      {
        "id": "561cedef73673ae4bb000007",
        "duration": 120,
        "comment": "Rewrite some stuff",
        "start_date": "2014-11-22T12:45:00Z",
        "app_user_id": "5724bdd1-5453-0132-6651-6003089sdfsdf"
      }
    ],
    "assignees": [
      {
        "id": "561cedef73673a5bbb0000a1",
        "role": 'SUPERVISOR',
        "rights": 'ALL',
        "status": 'ACTIVE',
        "user": "5724bdd1-5453-0132-6651-6003089sdfsdf",
        "team": "5724bdd1-5453-0132-6741-6003089sdfsdf"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a Task List
PUT/api/v2/:group_id/task_lists/{id}

Update a single Task List

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The task_list ID


Tax Codes

Describe a tax group which can be applied on sales or purchases. Sales taxes will all be applied to the amount of the sales (idem for purchase). Compounded taxes (esp. in the US) will be added soon… Total tax applicable is also given (sale_tax_rate, purchase_tax_rate).

Business Rules

To be a valid sale tax code, at least one tax_rate must be specified in the sale_taxes or sale_tax_rate must be specified.

To be a valid purchase tax code, at least one tax_rate must be specified in the purchase_taxes or purchase_tax_rate must be specified.

if sale_tax_rate is not specified, it is computed based on the list of sale_taxes

if purchase_tax_rate is not specified, it is computed based on the list of purchase_taxes

if sale_taxes is empty and sale_tax_rate is set, a default tax_rate is created and added to sale_taxes

if purchase_taxes is empty and purchase_tax_rate is set, a default tax_rate is created and added to purchase_taxes

Tax codes JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/tax_codes
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "tax_codes": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code",
          "name"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "TaxCode UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
            "type": "string",
            "format": "enum"
          },
          "name": {
            "description": "Tax code name",
            "type": "string"
          },
          "description": {
            "description": "Tax code description",
            "type": "string"
          },
          "tax_type": {
            "description": "[OUTPUT, INPUT, CAPEXINPUT, ...]",
            "type": "string",
            "format": "enum"
          },
          "sale_tax_rate": {
            "description": "Total sale taxes rate",
            "type": "number"
          },
          "purchase_tax_rate": {
            "description": "Total purchase taxes rate",
            "type": "number"
          },
          "sale_taxes": {
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "#TaxRate UUID",
                  "type": "string",
                  "format": "reference"
                },
                "name": {
                  "description": "Tax rate name",
                  "type": "string",
                  "readOnly": true
                },
                "rate": {
                  "description": "Applicable tax rate",
                  "type": "number",
                  "readOnly": true
                },
                "tax_type_applicable": {
                  "description": "[TaxOnAmount, TaxOnAmountPlusTax, TaxOnTax]",
                  "type": "string",
                  "format": "enum"
                },
                "tax_order": {
                  "description": "Application order of the tax rate",
                  "type": "number"
                }
              }
            }
          },
          "purchase_taxes": {
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "#TaxRate UUID",
                  "type": "string",
                  "format": "reference"
                },
                "name": {
                  "description": "Tax rate name",
                  "type": "string",
                  "readOnly": true
                },
                "rate": {
                  "description": "Applicable tax rate",
                  "type": "number",
                  "readOnly": true
                },
                "tax_type_applicable": {
                  "description": "[TaxOnAmount, TaxOnAmountPlusTax, TaxOnTax]",
                  "type": "string",
                  "format": "enum"
                },
                "tax_order": {
                  "description": "Application order of the tax rate",
                  "type": "number"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/tax_codes

Attributes

Field Type Description
resource_type String Resource type name
id String TaxCode UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
name String Tax code name
description String Tax code description
tax_type Enum [OUTPUT, INPUT, CAPEXINPUT, …]
sale_tax_rate Number Total sale taxes rate
purchase_tax_rate Number Total purchase taxes rate
sale_taxes Array
purchase_taxes Array
TaxCodes SaleTaxes attributes
Field Type Description
id Reference TaxRate UUID
name String Tax rate name
rate Number Applicable tax rate
tax_type_applicable Enum [TaxOnAmount, TaxOnAmountPlusTax, TaxOnTax]
tax_order Number Application order of the tax rate
TaxCodes PurchaseTaxes attributes
Field Type Description
id Reference TaxRate UUID
name String Tax rate name
rate Number Applicable tax rate
tax_type_applicable Enum [TaxOnAmount, TaxOnAmountPlusTax, TaxOnTax]
tax_order Number Application order of the tax rate

Tax Codes List

GET https://api-connec.maestrano.com/api/v2/:group_id/tax_codes
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "tax_codes": [
    {
      "id": "0ad5d441-5a97-0132-31ee-600308937d74",
      "group_id": "cld-gf5d41s",
      "created_at": "2014-11-30T08:16:00Z",
      "updated_at": "2014-11-30T08:16:00Z",
      "code": "TX-234",
      "status": "ACTIVE",
      "tax_type": "CAPEXINPUT",
      "name": "CustomSalesTax",
      "description": "Custom State Tax",
      "sale_tax_rate": 12.75,
      "purchase_tax_rate": 16.05,
      "sale_taxes": [
        {
          "id": "0ad11950-5a97-0132-31e9-600308937d74",
          "name": "GST",
          "rate": 10,
          "tax_type_applicable": "TaxOnAmount",
          "tax_order": 1
        },
        {
          "id": "0ad278e1-5a97-0132-31ea-600308937d74",
          "name": "Extra Tax",
          "rate": 2.5,
          "tax_type_applicable": "TaxOnAmountPlusTax",
          "tax_order": 2
        }
      ],
      "purchase_taxes": [
        {
          "id": "0ad38a51-5a97-0132-31eb-600308937d74",
          "name": "GST on Export",
          "rate": 10,
          "tax_type_applicable": "TaxOnAmountPlusTax",
          "tax_order": 1
        },
        {
          "id": "0ad49bc0-5a97-0132-31ed-600308937d74",
          "name": "Extra Tax",
          "rate": 5.5,
          "tax_type_applicable": "TaxOnTax",
          "tax_order": 2
        }
      ]
    }
  ]
}

Get Tax Codes
GET/api/v2/:group_id/tax_codes

Get the list of tax codes.


POST https://api-connec.maestrano.com/api/v2/:group_id/tax_codes
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "tax_codes": {
        "name": "CustomSalesTax",
        "description": "Custom State Tax",
        "sale_tax_rate": 12.75,
        "purchase_tax_rate": 16.05,
    }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
    "tax_codes": {
        "id": "0ad11950-5a97-0132-31e9-600308937d74",
        "group_id": "cld-f1f57re5"
        "created_at": "2014-11-18T04:24:19Z",
        "updated_at": "2014-11-18T04:24:19Z",
        "name": "CustomSalesTax",
        "description": "Custom State Tax",
        "sale_tax_rate": 12.75,
        "purchase_tax_rate": 16.05,
    }
}

Create New Tax Code
POST/api/v2/:group_id/tax_codes

Create a new tax code.


Tax Code

GET https://api-connec.maestrano.com/api/v2/:group_id/tax_codes/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "tax_codes": {
    "id": "0ad5d441-5a97-0132-31ee-600308937d74",
    "group_id": "cld-gf5d41s",
    "created_at": "2014-11-30T08:16:00Z",
    "updated_at": "2014-11-30T08:16:00Z",
    "name": "CustomSalesTax",
    "description": "Custom State Tax",
    "sale_tax_rate": 12.75,
    "purchase_tax_rate": 16.05,
    "sale_taxes": [
      {
        "id": "0ad11950-5a97-0132-31e9-600308937d74",
        "name": "GST",
        "rate": 10,
        "tax_type_applicable": "TaxOnAmount"
      },
      {
        "id": "0ad278e1-5a97-0132-31ea-600308937d74",
        "name": "Extra Tax",
        "rate": 2.5,
        "tax_type_applicable": "TaxOnAmountPlusTax"
      }
    ],
    "purchase_taxes": [
      {
        "id": "0ad38a51-5a97-0132-31eb-600308937d74",
        "name": "GST on Export",
        "rate": 10,
        "tax_type_applicable": "TaxOnAmountPlusTax"
      },
      {
        "id": "0ad49bc0-5a97-0132-31ed-600308937d74",
        "name": "Extra Tax",
        "rate": 5.5,
        "tax_type_applicable": "TaxOnTax"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Tax Code
GET/api/v2/:group_id/tax_codes/{id}

Get a single tax code.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The tax code ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/tax_codes/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
    "tax_codes": {
        "name": "CustomSalesTax",
        "description": "Custom State Tax",
    }

}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "tax_codes": {
    "id": "0ad5d441-5a97-0132-31ee-600308937d74",
    "group_id": "cld-gf5d41s",
    "created_at": "2014-11-30T08:16:00Z",
    "updated_at": "2014-11-30T08:16:00Z",
    "name": "CustomSalesTax",
    "description": "Custom State Tax",
    "sale_tax_rate": 12.75,
    "purchase_tax_rate": 16.05,
    "sale_taxes": [
      {
        "id": "0ad11950-5a97-0132-31e9-600308937d74",
        "name": "GST",
        "rate": 10,
        "tax_type_applicable": "TaxOnAmount"
      },
      {
        "id": "0ad278e1-5a97-0132-31ea-600308937d74",
        "name": "Extra Tax",
        "rate": 2.5,
        "tax_type_applicable": "TaxOnAmountPlusTax"
      }
    ],
    "purchase_taxes": [
      {
        "id": "0ad38a51-5a97-0132-31eb-600308937d74",
        "name": "GST on Export",
        "rate": 10,
        "tax_type_applicable": "TaxOnAmountPlusTax"
      },
      {
        "id": "0ad49bc0-5a97-0132-31ed-600308937d74",
        "name": "Extra Tax",
        "rate": 5.5,
        "tax_type_applicable": "TaxOnTax"
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Tax Code
PUT/api/v2/:group_id/tax_codes/{id}

Update a single Tax Code

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The tax code ID


Tax Rates

Describe a tax rate to be used within a tax code. The list of tax rates is a repository of taxes commonly used for the sale or purchase of goods.

Tax rates JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/tax_rates
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "tax_rates": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "required": [
          "name",
          "rate"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "TaxRate UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "name": {
            "description": "Tax rate name",
            "type": "string"
          },
          "rate": {
            "description": "Applicable tax rate",
            "type": "number"
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/tax_rates

Attributes

Field Type Description
resource_type String Resource type name
id String TaxRate UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
name String Tax rate name
rate Number Applicable tax rate

Tax Rates List

GET https://api-connec.maestrano.com/api/v2/:group_id/tax_rates
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "tax_rates": [
    {
      "id": "0ad11950-5a97-0132-31e9-600308937d74",
      "group_id": "cld-f1f57re5",
      "created_at": "2014-11-18T04:24:19Z",
      "updated_at": "2014-11-18T04:24:19Z",
      "name": "GST",
      "rate": 10
    }
  ]
}

Get Tax Rates
GET/api/v2/:group_id/tax_rates

Get the list of tax rates.


POST https://api-connec.maestrano.com/api/v2/:group_id/tax_rates
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "tax_rates": {
    "name": "GST",
    "rate": 10
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
    "tax_rates": {
        "id": "0ad11950-5a97-0132-31e9-600308937d74",
        "group_id": "cld-f1f57re5"
        "created_at": "2014-11-18T04:24:19Z",
        "updated_at": "2014-11-18T04:24:19Z",
        "name": "GST",
        "rate": 10.0
    }
}

Create New Tax Rate
POST/api/v2/:group_id/tax_rates

Create a new tax rate.


Tax Rate

GET https://api-connec.maestrano.com/api/v2/:group_id/tax_rates/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
    "tax_rates": {
        "id": "0ad11950-5a97-0132-31e9-600308937d74",
        "group_id": "cld-f1f57re5"
        "created_at": "2014-11-18T04:24:19Z",
        "updated_at": "2014-11-18T04:24:19Z",
        "name": "GST",
        "rate": 10.0
    }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Tax Rate
GET/api/v2/:group_id/tax_rates/{id}

Get a single tax rate.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The tax rate ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/tax_rates/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "tax_rates": {
    "name": "GST",
    "rate": 10
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
    "tax_rates": {
        "id": "0ad11950-5a97-0132-31e9-600308937d74",
        "group_id": "cld-f1f57re5"
        "created_at": "2014-11-18T04:24:19Z",
        "updated_at": "2014-11-18T04:24:19Z",
        "name": "GST",
        "rate": 10.0
    }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Tax Rate
PUT/api/v2/:group_id/tax_rates/{id}

Update a single Tax Rate

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The tax rate ID


Teams

Business Rules

  • Represents a team of several AppUsers (eg: a team of sales representatives in a CRM)

  • A Team can have several AppUsers and an AppUser can belong to several Teams

Teams List

GET https://api-connec.maestrano.com/teams
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "teams": [
    {
      "id": "7c566201-037f-0134-538a-5969c36333f5",
      "code": "TEA3",
      "name": "Sales Reps",
      "description": "All members of sales department",
      "type": "Sales",
      "members": [
        {
          "id": "1ed17491-e9b1-0133-9582-0d535fd9d9bb"
        }
      ],
      "group_id": "org-fbbw",
      "channel_id": "org-fbbw",
      "resource_type": "teams"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "teams": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "members": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              }
            }
          }
        },
        "group_id": {
          "type": "string"
        },
        "channel_id": {
          "type": "string"
        },
        "resource_type": {
          "type": "string"
        }
      }
    }
  }
}

Get Teams
GET/teams

List the teams for your applications.

Attributes

Field Type Description
id String Team UUID
code String Code, auto-generated if not specified
name String Name of the team
description String Description of the team
type String Team’s type as defined in the application
[members] Array AppUsers the app users being members of this team

POST https://api-connec.maestrano.com/teams
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "teams": {
    "name": "Sales Reps",
    "description": "All members of sales department",
    "type": "Sales",
    "members": [
      {
        "id": "1ed17491-e9b1-0133-9582-0d535fd9d9bb"
      }
    ]
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "teams": {
    "id": "7c566201-037f-0134-538a-5969c36333f5",
    "code": "TEA3",
    "name": "Sales Reps",
    "description": "All members of sales department",
    "type": "Sales",
    "members": [
      {
        "id": "1ed17491-e9b1-0133-9582-0d535fd9d9bb"
      }
    ],
    "group_id": "org-fbbw",
    "channel_id": "org-fbbw",
    "resource_type": "teams"
  }
}

Create New Team
POST/teams

Create a new Team.


Team

GET https://api-connec.maestrano.com/teams/7c566201-037f-0134-538a-5969c36333f5
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "teams": {
    "id": "7c566201-037f-0134-538a-5969c36333f5",
    "code": "TEA3",
    "name": "Sales Reps",
    "description": "All members of sales department",
    "type": "Sales",
    "members": [
      {
        "id": "1ed17491-e9b1-0133-9582-0d535fd9d9bb"
      }
    ],
    "group_id": "org-fbbw",
    "channel_id": "org-fbbw",
    "resource_type": "teams"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "7c566201-037f-0134-538a-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Team
GET/teams/{id}

Get a single Team.

URI Parameters
HideShow
id
string (required) Example: 7c566201-037f-0134-538a-5969c36333f5

The team ID


PUT https://api-connec.maestrano.com/teams/7c566201-037f-0134-538a-5969c36333f5
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "name": "Sales Representatives"
}
Responses200404
Body
{
  "teams": {
    "id": "7c566201-037f-0134-538a-5969c36333f5",
    "code": "TEA3",
    "name": "Sales Representatives",
    "description": "All members of sales department",
    "type": "Sales",
    "members": [
      {
        "id": "1ed17491-e9b1-0133-9582-0d535fd9d9bb"
      }
    ],
    "group_id": "org-fbbw",
    "channel_id": "org-fbbw",
    "resource_type": "teams"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "7c566201-037f-0134-538a-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Team
PUT/teams/{id}

Update a single Team.

URI Parameters
HideShow
id
string (required) Example: 7c566201-037f-0134-538a-5969c36333f5

The team ID


Time Activities

A TimeActivity represents a pediod of time an Employee has worked on a project, activity, job…

Time activities JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/time_activities
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "time_activities": {
      "id": "time_activities",
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "TimeActivity UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "transaction_date": {
            "description": "Transaction date",
            "type": "string",
            "format": "date-time"
          },
          "taxable": {
            "description": "Are tax applied to the transaction",
            "type": "boolean"
          },
          "hourly_rate": {
            "description": "Hourly rate",
            "type": "number"
          },
          "hours": {
            "description": "Total number of hours for this timeactivity (excluding minutes)",
            "type": "number"
          },
          "minutes": {
            "description": "Total number of minutes for this timeactivity (excluding hours)",
            "type": "number"
          },
          "time_zone": {
            "description": "Timezone: use ISO 8601 notation (e.g. +10:00)",
            "type": "string"
          },
          "start_time": {
            "description": "TimeActivity start time",
            "type": "string",
            "format": "date-time"
          },
          "end_time": {
            "description": "TimeActivity end time",
            "type": "string",
            "format": "date-time"
          },
          "break_hours": {
            "description": "Break hours",
            "type": "number"
          },
          "break_minutes": {
            "description": "Break minutes",
            "type": "number"
          },
          "employee_id": {
            "description": "#Employee this TimeActivity belongs to",
            "type": "string",
            "format": "reference"
          },
          "organization_id": {
            "description": "Customer/Vendor #Organization this activity applies to",
            "type": "string",
            "format": "reference"
          },
          "person_id": {
            "description": "Customer/Vendor #Person this activity applies to",
            "type": "string",
            "format": "reference"
          },
          "item_id": {
            "description": "#Item (product or service) this activity applies to",
            "type": "string",
            "format": "reference"
          },
          "work_location_id": {
            "description": "#WorkLocation this activity refers to",
            "type": "string",
            "format": "reference"
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/time_activities

Attributes

Field Type Description
resource_type String Resource type name
id String TimeActivity UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
transaction_date Date Time Transaction date
taxable Boolean Are tax applied to the transaction
hourly_rate Number Hourly rate
hours Number Total number of hours for this timeactivity (excluding minutes)
minutes Number Total number of minutes for this timeactivity (excluding hours)
time_zone String Timezone: use ISO 8601 notation (e.g. +10:00)
start_time Date Time TimeActivity start time
end_time Date Time TimeActivity end time
break_hours Number Break hours
break_minutes Number Break minutes
employee_id Reference Employee this TimeActivity belongs to
organization_id Reference Customer/Vendor Organization this activity applies to
person_id Reference Customer/Vendor Person this activity applies to
item_id Reference Item (product or service) this activity applies to
work_location_id Reference WorkLocation this activity refers to

TimeActivity List

GET https://api-connec.maestrano.com/api/v2/:group_id/time_activities
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "time_activities": [
    {
      "id": "65432750-a8f0-0132-9e6b-22000aac819e",
      "transaction_date": "2015-04-01",
      "description": "5 hours work on-site",
      "billable_status": "billable",
      "taxable": false,
      "hourly_rate": 12.2,
      "hours": 5,
      "minutes": 0,
      "break_hours": 0,
      "break_minutes": 0,
      "start_time": "2015-03-01T09:00:00.000Z",
      "end_time": "2015-03-01T14:00:00.000Z",
      "employee_id": "5e67ef61-a8f0-0132-9e1e-22000aac819e",
      "work_location_id": "0ba3b687-1406-4af1-9de6-4b0a94eed8b1",
      "person_id": "6ty3b687-1406-4af1-9de6-4b0a94eed8b1",
      "organization_id": "9iu3b687-1406-4af1-9de6-4b0a94eed8b1",
      "item_id": "4ew3b687-1406-4af1-9de6-4b0a94eed8b1",
      "updated_at": "2015-03-10T01:12:08.024Z",
      "created_at": "2015-03-10T01:12:08.024Z"
    }
  ]
}

Get TimeActivity
GET/api/v2/:group_id/time_activities

Get the list of TimeActivities.


POST https://api-connec.maestrano.com/api/v2/:group_id/time_activities
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "time_activities": {
    "transaction_date": "2015-04-01",
    "status": "APPROVED",
    "description": "5 hours work on-site",
    "billable_status": "billable",
    "taxable": false,
    "hours": 5,
    "minutes": 0,
    "start_time": "2015-03-01T09:00:00.000Z",
    "end_time": "2015-03-01T14:00:00.000Z",
    "employee_id": "5e67ef61-a8f0-0132-9e1e-22000aac819e"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "time_activities": {
    "id": "65432750-a8f0-0132-9e6b-22000aac819e",
    "transaction_date": "2015-04-01",
    "status": "APPROVED",
    "description": "5 hours work on-site",
    "billable_status": "billable",
    "taxable": false,
    "hours": 5,
    "minutes": 0,
    "start_time": "2015-03-01T09:00:00.000Z",
    "end_time": "2015-03-01T14:00:00.000Z",
    "employee_id": "5e67ef61-a8f0-0132-9e1e-22000aac819e",
    "updated_at": "2015-03-10T01:12:08.024Z",
    "created_at": "2015-03-10T01:12:08.024Z"
  }
}

Create New TimeActivity
POST/api/v2/:group_id/time_activities

Create a new TimeActivity.


TimeActivity

GET https://api-connec.maestrano.com/api/v2/:group_id/time_activities/65432750-a8f0-0132-9e6b-22000aac819e
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "time_activities": {
    "id": "65432750-a8f0-0132-9e6b-22000aac819e",
    "transaction_date": "2015-04-01",
    "status": "APPROVED",
    "description": "5 hours work on-site",
    "billable_status": "billable",
    "taxable": false,
    "hours": 5,
    "minutes": 0,
    "start_time": "2015-03-01T09:00:00.000Z",
    "end_time": "2015-03-01T14:00:00.000Z",
    "employee_id": "5e67ef61-a8f0-0132-9e1e-22000aac819e",
    "updated_at": "2015-03-10T01:12:08.024Z",
    "created_at": "2015-03-10T01:12:08.024Z"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get TimeActivity
GET/api/v2/:group_id/time_activities/{id}

Get a single TimeActivity.

URI Parameters
HideShow
id
string (required) Example: 65432750-a8f0-0132-9e6b-22000aac819e

The TimeActivity ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/time_activities/65432750-a8f0-0132-9e6b-22000aac819e
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "time_activities": {
    "start_time": "2015-03-01T09:00:00.000Z",
    "end_time": "2015-03-01T14:00:00.000Z",
    "employee_id": "5e67ef61-a8f0-0132-9e1e-22000aac819e"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "time_activities": {
    "id": "65432750-a8f0-0132-9e6b-22000aac819e",
    "transaction_date": "2015-04-01",
    "status": "APPROVED",
    "description": "5 hours work on-site",
    "billable_status": "billable",
    "taxable": false,
    "hours": 5,
    "minutes": 0,
    "start_time": "2015-03-01T09:00:00.000Z",
    "end_time": "2015-03-01T14:00:00.000Z",
    "employee_id": "5e67ef61-a8f0-0132-9e1e-22000aac819e",
    "updated_at": "2015-03-10T01:12:08.024Z",
    "created_at": "2015-03-10T01:12:08.024Z"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an TimeActivity
PUT/api/v2/:group_id/time_activities/{id}

Update a single TimeActivity

URI Parameters
HideShow
id
string (required) Example: 65432750-a8f0-0132-9e6b-22000aac819e

The TimeActivity ID


Time Sheets

A TimeSheet represents the time worked by an Employee for a given time period

TimeSheets JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/time_sheets
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "time_sheets": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Person UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[DRAFT, PROCESSED, APPROVED, INACTIVE] - Default: DRAFT",
            "type": "string",
            "format": "enum"
          },
          "hours": {
            "description": "Total number of hours for this timesheet (excluding minutes)",
            "type": "number"
          },
          "minutes": {
            "description": "Total number of minutes for this timesheet (excluding hours)",
            "type": "number"
          },
          "start_date": {
            "description": "TimeSheet start date",
            "type": "string",
            "format": "date-time"
          },
          "end_date": {
            "description": "TimeSheet end date",
            "type": "string",
            "format": "date-time"
          },
          "employee_id": {
            "description": "#Employee this TimeSheet belongs to",
            "type": "string",
            "format": "reference"
          },
          "project_id": {
            "description": "#Project this TimeSheet refers to",
            "type": "string",
            "format": "reference"
          },
          "project_task_id": {
            "description": "#Task this TimeSheet refers to",
            "type": "string",
            "format": "reference"
          },
          "time_sheet_lines": {
            "description": "TimeSheet breakdown per activity and pay item",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "TimeSheetLine id",
                  "type": "string"
                },
                "line_order": {
                  "description": "Time sheet line number",
                  "type": "number"
                },
                "hours": {
                  "description": "Total number of hours for this timesheet line (excluding minutes)",
                  "type": "number"
                },
                "minutes": {
                  "description": "Total number of minutes for this timesheet line (excluding hours)",
                  "type": "number"
                },
                "employee_id": {
                  "description": "#Employee the TimeSheet belongs to",
                  "type": "string",
                  "format": "reference"
                },
                "project_id": {
                  "description": "#Project the TimeSheetLine refers to",
                  "type": "string",
                  "format": "reference"
                },
                "project_task_id": {
                  "description": "#Task the TimeSheetLine refers to",
                  "type": "string",
                  "format": "reference"
                },
                "organization_id": {
                  "description": "Customer/Vendor #Organization the TimeSheetLine refers to",
                  "type": "string",
                  "format": "reference"
                },
                "person_id": {
                  "description": "Customer/Vendor #Person the TimeSheetLine refers to",
                  "type": "string",
                  "format": "reference"
                },
                "item_id": {
                  "description": "#Item (product or service) the TimeSheetLine refers to",
                  "type": "string",
                  "format": "reference"
                },
                "pay_item_id": {
                  "description": "#PayItem the TimeSheetLine refers to",
                  "type": "string",
                  "format": "reference"
                },
                "work_location_id": {
                  "description": "#WorkLocation the TimeSheetLine refers to",
                  "type": "string",
                  "format": "reference"
                },
                "time_activities": {
                  "description": "Activities breakdown per date",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "uniq": [
                      "id"
                    ],
                    "properties": {
                      "id": {
                        "description": "#TimeActivity reference",
                        "type": "string",
                        "format": "reference"
                      },
                      "transaction_date": {
                        "description": "Time Activity date",
                        "type": "date-time"
                      },
                      "hours": {
                        "description": "Total number of hours for this Time Activity (excluding minutes)",
                        "type": "number"
                      },
                      "minutes": {
                        "description": "Total number of minutes for this Time Activity (excluding hours)",
                        "type": "number"
                      },
                      "employee_id": {
                        "description": "#Employee the TimeActivity belongs to",
                        "type": "string",
                        "format": "reference"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/time_sheets

Attributes

Field Type Description
resource_type String Resource type name
id String Person UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [DRAFT, PROCESSED, APPROVED, INACTIVE] - Default: DRAFT
hours Number Total number of hours for this timesheet (excluding minutes)
minutes Number Total number of minutes for this timesheet (excluding hours)
start_date Date Time TimeSheet start date
end_date Date Time TimeSheet end date
employee_id Reference Employee this TimeSheet belongs to
project_id Reference Project this TimeSheet refers to
project_task_id Reference Task this TimeSheet refers to
time_sheet_lines Array TimeSheet breakdown per activity and pay item
TimeSheets TimeSheetLines attributes
Field Type Description
id String TimeSheetLine id
line_order Number Time sheet line number
hours Number Total number of hours for this timesheet line (excluding minutes)
minutes Number Total number of minutes for this timesheet line (excluding hours)
employee_id Reference Employee the TimeSheet belongs to
project_id Reference Project the TimeSheetLine refers to
project_task_id Reference Task the TimeSheetLine refers to
organization_id Reference Customer/Vendor Organization the TimeSheetLine refers to
person_id Reference Customer/Vendor Person the TimeSheetLine refers to
item_id Reference Item (product or service) the TimeSheetLine refers to
pay_item_id Reference PayItem the TimeSheetLine refers to
work_location_id Reference WorkLocation the TimeSheetLine refers to
time_activities Array Activities breakdown per date
TimeSheets TimeActivities attributes
Field Type Description
id Reference TimeActivity reference
transaction_date Date Time Time Activity date
hours Number Total number of hours for this Time Activity (excluding minutes)
minutes Number Total number of minutes for this Time Activity (excluding hours)
employee_id Reference Employee the TimeActivity belongs to

TimeSheet List

GET https://api-connec.maestrano.com/api/v2/:group_id/time_sheets
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "time_sheets": [
    {
      "id": "bee2e111-bee9-0132-301d-56847afe9799",
      "code": "TS123",
      "status": "APPROVED",
      "hours": 10,
      "minutes": 0,
      "start_date": "2015-04-27",
      "end_date": "2015-05-03",
      "employee_id": "75484221-bee9-0132-2fd4-56847afe9799",
      "project_id": "45684221-bee9-0132-2fd4-56847afe9799",
      "project_task_id": "98784221-bee9-0132-2fd4-56847afe9799",
      "time_sheet_lines": [
        {
          "id": "552322ad0202cb423200d921",
          "line_order": 1,
          "hours": 10,
          "minutes": 0,
          "employee_id": "75484221-bee9-0132-2fd4-56847afe9799",
          "organization_id": "fb2e1001-fd4a-0132-dda4-56847afe9799,",
          "person_id": "d972c7a1-fd4d-0132-de00-56847afe9799,",
          "item_id": "14f8a6e1-fd4a-0132-db75-56847afe9799",
          "pay_item_id": "c4085d83-b43e-4d8d-b32b-b136ce8ca16a",
          "project_id": "65439c70-a8f0-0132-9e6e-22000aac819e",
          "project_task_id": "5e67ef61-a8f0-0132-9e1e-22000aac819e",
          "work_location_id": "0ba3b687-1406-4af1-9de6-4b0a94eed8b1",
          "time_activities": [
            {
              "id": "bee503f1-bee9-0132-301e-56847afe9799",
              "transaction_date": "2015-05-02",
              "hours": 5,
              "minutes": 0,
              "employee_id": "75484221-bee9-0132-2fd4-56847afe9799"
            },
            {
              "id": "bee52b01-bee9-0132-301f-56847afe9799",
              "transaction_date": "2015-05-03",
              "hours": 5,
              "minutes": 0,
              "employee_id": "75484221-bee9-0132-2fd4-56847afe9799"
            }
          ]
        }
      ],
      "updated_at": "2015-04-07T00:19:57.505Z",
      "created_at": "2015-04-07T00:19:57.505Z"
    }
  ]
}

Get TimeSheet
GET/api/v2/:group_id/time_sheets

Get the list of TimeSheets.


POST https://api-connec.maestrano.com/api/v2/:group_id/time_sheets
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "time_sheets": {
    "id": "bee2e111-bee9-0132-301d-56847afe9799",
    "status": "APPROVED",
    "hours": 10,
    "minutes": 0,
    "start_date": "2015-04-27",
    "end_date": "2015-05-03",
    "employee_id": "75484221-bee9-0132-2fd4-56847afe9799",
    "time_sheet_lines": [
      {
        "id": "552322ad0202cb423200d921",
        "line_order": 1,
        "hours": 10,
        "minutes": 0,
        "employee_id": "75484221-bee9-0132-2fd4-56847afe9799",
        "time_activities": [
          {
            "id": "bee503f1-bee9-0132-301e-56847afe9799",
            "transaction_date": "2015-05-02",
            "hours": 5,
            "minutes": 0,
            "employee_id": "75484221-bee9-0132-2fd4-56847afe9799"
          },
          {
            "id": "bee52b01-bee9-0132-301f-56847afe9799",
            "transaction_date": "2015-05-03",
            "hours": 5,
            "minutes": 0,
            "employee_id": "75484221-bee9-0132-2fd4-56847afe9799"
          }
        ]
      }
    ],
    "updated_at": "2015-04-07T00:19:57.505Z",
    "created_at": "2015-04-07T00:19:57.505Z"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "time_sheets": {
    "id": "bee2e111-bee9-0132-301d-56847afe9799",
    "status": "APPROVED",
    "hours": 10,
    "minutes": 0,
    "start_date": "2015-04-27",
    "end_date": "2015-05-03",
    "employee_id": "75484221-bee9-0132-2fd4-56847afe9799",
    "time_sheet_lines": [
      {
        "id": "552322ad0202cb423200d921",
        "line_order": 1,
        "hours": 10,
        "minutes": 0,
        "employee_id": "75484221-bee9-0132-2fd4-56847afe9799",
        "time_activities": [
          {
            "id": "bee503f1-bee9-0132-301e-56847afe9799",
            "transaction_date": "2015-05-02",
            "hours": 5,
            "minutes": 0,
            "employee_id": "75484221-bee9-0132-2fd4-56847afe9799"
          },
          {
            "id": "bee52b01-bee9-0132-301f-56847afe9799",
            "transaction_date": "2015-05-03",
            "hours": 5,
            "minutes": 0,
            "employee_id": "75484221-bee9-0132-2fd4-56847afe9799"
          }
        ]
      }
    ],
    "updated_at": "2015-04-07T00:19:57.505Z",
    "created_at": "2015-04-07T00:19:57.505Z"
  }
}

Create New TimeSheet
POST/api/v2/:group_id/time_sheets

Create a new TimeSheet.


TimeSheet

GET https://api-connec.maestrano.com/api/v2/:group_id/time_sheets/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "time_sheets": {
    "id": "bee2e111-bee9-0132-301d-56847afe9799",
    "status": "APPROVED",
    "hours": 10,
    "minutes": 0,
    "start_date": "2015-04-27",
    "end_date": "2015-05-03",
    "employee_id": "75484221-bee9-0132-2fd4-56847afe9799",
    "time_sheet_lines": [
      {
        "id": "552322ad0202cb423200d921",
        "line_order": 1,
        "hours": 10,
        "minutes": 0,
        "employee_id": "75484221-bee9-0132-2fd4-56847afe9799",
        "time_activities": [
          {
            "id": "bee503f1-bee9-0132-301e-56847afe9799",
            "transaction_date": "2015-05-02",
            "hours": 5,
            "minutes": 0,
            "employee_id": "75484221-bee9-0132-2fd4-56847afe9799"
          },
          {
            "id": "bee52b01-bee9-0132-301f-56847afe9799",
            "transaction_date": "2015-05-03",
            "hours": 5,
            "minutes": 0,
            "employee_id": "75484221-bee9-0132-2fd4-56847afe9799"
          }
        ]
      }
    ],
    "updated_at": "2015-04-07T00:19:57.505Z",
    "created_at": "2015-04-07T00:19:57.505Z"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get TimeSheet
GET/api/v2/:group_id/time_sheets/{id}

Get a single TimeSheet.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The TimeSheet ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/time_sheets/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "time_sheets": {
    "start_date": "2015-04-27",
    "end_date": "2015-05-03",
    "employee_id": "75484221-bee9-0132-2fd4-56847afe9799"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "time_sheets": {
    "id": "bee2e111-bee9-0132-301d-56847afe9799",
    "status": "APPROVED",
    "hours": 10,
    "minutes": 0,
    "start_date": "2015-04-27",
    "end_date": "2015-05-03",
    "employee_id": "75484221-bee9-0132-2fd4-56847afe9799",
    "time_sheet_lines": [
      {
        "id": "552322ad0202cb423200d921",
        "line_order": 1,
        "hours": 10,
        "minutes": 0,
        "employee_id": "75484221-bee9-0132-2fd4-56847afe9799",
        "time_activities": [
          {
            "id": "bee503f1-bee9-0132-301e-56847afe9799",
            "transaction_date": "2015-05-02",
            "hours": 5,
            "minutes": 0,
            "employee_id": "75484221-bee9-0132-2fd4-56847afe9799"
          },
          {
            "id": "bee52b01-bee9-0132-301f-56847afe9799",
            "transaction_date": "2015-05-03",
            "hours": 5,
            "minutes": 0,
            "employee_id": "75484221-bee9-0132-2fd4-56847afe9799"
          }
        ]
      }
    ],
    "updated_at": "2015-04-07T00:19:57.505Z",
    "created_at": "2015-04-07T00:19:57.505Z"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an TimeSheet
PUT/api/v2/:group_id/time_sheets/{id}

Update a single TimeSheet

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The TimeSheet ID


Transfers

Transfers JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/transfers
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "transfers": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Transfer UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[DRAFT, SUBMITTED, AUTHORISED, INACTIVE, APPLIED, UNAPPLIED] - Default: DRAFT",
            "type": "string",
            "format": "enum"
          },
          "title": {
            "description": "Deposit title",
            "type": "string"
          },
          "transaction_date": {
            "description": "Transaction date",
            "type": "string",
            "format": "date-time"
          },
          "private_note": {
            "description": "Private internal note",
            "type": "string"
          },
          "total_amount": {
            "description": "Transfer total amount",
            "type": "number"
          },
          "currency": {
            "description": "Transfer currency code",
            "type": "string"
          },
          "from_account_id": {
            "description": "#Account the transfer is originating from",
            "type": "string",
            "format": "reference"
          },
          "to_account_id": {
            "description": "#Account the transfer is going to",
            "type": "string",
            "format": "reference"
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/transfers

Attributes

Field Type Description
resource_type String Resource type name
id String Transfer UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [DRAFT, SUBMITTED, AUTHORISED, INACTIVE, APPLIED, UNAPPLIED] - Default: DRAFT
title String Deposit title
transaction_date Date Time Transaction date
private_note String Private internal note
total_amount Number Transfer total amount
currency String Transfer currency code
from_account_id Reference Account the transfer is originating from
to_account_id Reference Account the transfer is going to

Transfers List

GET https://api-connec.maestrano.com/api/v2/:group_id/transfers
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "transfers": [
    {
      "id": "815743a0-1915-0134-bd38-745c899ef027",
      "code": "DE3",
      "title": "Transfer",
      "total_amount": 12,
      "transaction_date": "2015-10-01T23:00:00Z",
      "status": "DRAFT",
      "private_note": "private note",
      "currency": "USD",
      "from_account_id": "3f58c721-5102-0132-6600-600308937d74",
      "to_account_id": "1258c721-5102-0132-6600-600308937d71",
      "created_at": "2016-06-20T13:04:54Z",
      "updated_at": "2016-06-20T13:04:54Z",
      "group_id": "org-fbba",
      "channel_id": "org-fbba",
      "resource_type": "transfers"
    }
  ]
}

Get Transfers
GET/api/v2/:group_id/transfers

Get the list of transfers.


POST https://api-connec.maestrano.com/api/v2/:group_id/transfers
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "transfers": {
    "title": "Transfer"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "transfers": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "title": "Transfer"
  }
}

Create New Transfer
POST/api/v2/:group_id/transfers

Create a new transfer.


Transfer

GET https://api-connec.maestrano.com/api/v2/:group_id/transfers/815743a0-1915-0134-bd38-745c899ef027
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "transfers": {
    "id": "815743a0-1915-0134-bd38-745c899ef027",
    "code": "DE3",
    "title": "Transfer",
    "total_amount": 12,
    "transaction_date": "2015-10-01T23:00:00Z",
    "status": "DRAFT",
    "public_note": "public note",
    "to_account_id": "3f58c721-5102-0132-6600-600308937d74",
    "from_account_id": "1258c721-5102-0132-6600-600308937d71",
    "created_at": "2016-06-20T13:04:54Z",
    "updated_at": "2016-06-20T13:04:54Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "transfers"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Transfer
GET/api/v2/:group_id/transfers/{id}

Get a single transfer.

URI Parameters
HideShow
id
string (required) Example: 815743a0-1915-0134-bd38-745c899ef027

The transfer ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/transfers/815743a0-1915-0134-bd38-745c899ef027
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "transfers": {
    "title": "Transfer"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "transfers": {
    "id": "815743a0-1915-0134-bd38-745c899ef027",
    "code": "DE3",
    "title": "Transfer",
    "total_amount": 12,
    "transaction_date": "2015-10-01T23:00:00Z",
    "status": "DRAFT",
    "public_note": "public note",
    "to_account_id": "3f58c721-5102-0132-6600-600308937d74",
    "from_account_id": "1258c721-5102-0132-6600-600308937d71",
    "created_at": "2016-06-20T13:04:54Z",
    "updated_at": "2016-06-20T13:04:54Z",
    "group_id": "org-fbba",
    "channel_id": "org-fbba",
    "resource_type": "transfers"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a Transfer
PUT/api/v2/:group_id/transfers/{id}

Update a single transfer

URI Parameters
HideShow
id
string (required) Example: 815743a0-1915-0134-bd38-745c899ef027

The transfer ID


Venues

A venue is a place an event occurs at

Venue JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/venues
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "venues": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Venue UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
            "type": "string",
            "format": "enum"
          },
          "name": {
            "description": "Venue name",
            "type": "string"
          },
          "latitude": {
            "description": "Venue latitude",
            "type": "number"
          },
          "longitude": {
            "description": "Venue longitude",
            "type": "number"
          },
          "address": {
            "description": "Venue addresses",
            "$ref": "#/definitions/address"
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/venues

Attributes

Field Type Description
resource_type String Resource type name
id String Venue UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
name String Venue name
latitude Number Venue latitude
longitude Number Venue longitude
address Address Venue addresses

Venues List

GET https://api-connec.maestrano.com/api/v2/:group_id/venues
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "venues": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "group_id": "cld-f4g8r2g",
      "code": "VE7",
      "status": "ACTIVE",
      "name": "Grand hotel",
      "latitude": 40.7127,
      "longitude": 74.0059,
      "address": {
        "billing": {
          "line1": "279 Church St",
          "city": "New York",
          "region": "NY",
          "postal_code": "10013",
          "country": "US"
        },
        "shipping": {
          "line1": "88 Elizabeth Street",
          "line2": "",
          "city": "Sydney",
          "region": "NSW",
          "postal_code": "2088",
          "country": "Australia"
        }
      },
      "created_at": "2016-05-24T04:24:08Z",
      "updated_at": "2016-05-24T04:29:14Z",
      "channel_id": "org-fbbw",
      "resource_type": "venues"
    }
  ]
}

Get Venues
GET/api/v2/:group_id/venues

Get the list of venues.


POST https://api-connec.maestrano.com/api/v2/:group_id/venues
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "venues": {
    "name": "Waterpool"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "venues": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "name": "Waterpool"
  }
}

Create New Venue
POST/api/v2/:group_id/venues

Create a new venue.


Venue

GET https://api-connec.maestrano.com/api/v2/:group_id/venues/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "venues": {
    "id": "48427741-0395-0134-53b9-5969c36333f5",
    "group_id": "cld-f4g8r2g",
    "code": "VE7",
    "status": "ACTIVE",
    "name": "Grand hotel",
    "latitude": 40.7127,
    "longitude": 74.0059,
    "address": {
      "billing": {
        "line1": "279 Church St",
        "city": "New York",
        "region": "NY",
        "postal_code": "10013",
        "country": "US"
      },
      "shipping": {
        "line1": "88 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2088",
        "country": "Australia"
      }
    },
    "created_at": "2016-05-24T04:24:08Z",
    "updated_at": "2016-05-24T04:29:14Z",
    "channel_id": "org-fbbw",
    "resource_type": "venues"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Venue
GET/api/v2/:group_id/venues/{id}

Get a single venue.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The venue ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/venues/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "venues": {
    "latitude": 40.7127
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "venues": {
    "id": "48427741-0395-0134-53b9-5969c36333f5",
    "group_id": "cld-f4g8r2g",
    "code": "VE7",
    "status": "ACTIVE",
    "name": "Grand hotel",
    "latitude": 40.7127,
    "longitude": 74.0059,
    "address": {
      "billing": {
        "line1": "279 Church St",
        "city": "New York",
        "region": "NY",
        "postal_code": "10013",
        "country": "US"
      },
      "shipping": {
        "line1": "88 Elizabeth Street",
        "line2": "",
        "city": "Sydney",
        "region": "NSW",
        "postal_code": "2088",
        "country": "Australia"
      }
    },
    "created_at": "2016-05-24T04:24:08Z",
    "updated_at": "2016-05-24T04:29:14Z",
    "channel_id": "org-fbbw",
    "resource_type": "venues"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "48427741-0395-0134-53b9-5969c36333f5",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update a Venue
PUT/api/v2/:group_id/venues/{id}

Update a single Venue

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The venue ID


Warehouses

Warehouse JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/warehouses
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "warehouses": {
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "Warehouse UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "status": {
            "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
            "type": "string",
            "format": "enum"
          },
          "name": {
            "description": "Warehouse name",
            "type": "string"
          },
          "description": {
            "description": "Warehouse description",
            "type": "string"
          },
          "type": {
            "description": "Warehouse type",
            "type": "string",
            "format": "enum"
          },
          "capacity": {
            "description": "Warehouse capacity",
            "type": "number"
          },
          "units": {
            "description": "Warehouse capacity unit",
            "type": "string"
          },
          "primary": {
            "description": "Is Warehouse primary",
            "type": "boolean"
          },
          "latitude": {
            "description": "Warehouse latitude",
            "type": "number"
          },
          "longitude": {
            "description": "Warehouse longitude",
            "type": "number"
          },
          "address": {
            "description": "Warehouse address",
            "$ref": "#/definitions/address"
          },
          "phone_work": {
            "description": "Warehouse phone and fax numbers",
            "$ref": "#/definitions/phone"
          },
          "total_value": {
            "description": "Warehouse total value",
            "$ref": "#/definitions/price"
          },
          "warehouse_stocks": {
            "description": "Warehouse stocks",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "WarehouseStock id",
                  "type": "string"
                },
                "status": {
                  "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
                  "type": "string",
                  "format": "enum"
                },
                "item_id": {
                  "description": "#Item this stock refers to",
                  "type": "string",
                  "format": "reference"
                },
                "quantity": {
                  "description": "Item quantity",
                  "type": "number"
                },
                "units": {
                  "description": "Quantity unit",
                  "type": "string"
                },
                "value": {
                  "description": "Stock value",
                  "$ref": "#/definitions/price"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/warehouses

Attributes

Field Type Description
resource_type String Resource type name
id String Warehouse UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
name String Warehouse name
description String Warehouse description
type Enum Warehouse type
capacity Number Warehouse capacity
units String Warehouse capacity unit
primary Boolean Is Warehouse primary
latitude Number Warehouse latitude
longitude Number Warehouse longitude
address Address Warehouse address
phone_work Phone Warehouse phone and fax numbers
total_value Price Warehouse total value
warehouse_stocks Array Warehouse stocks
Warehouses WarehouseStocks attributes
Field Type Description
id String WarehouseStock id
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
item_id Reference Item this stock refers to
quantity Number Item quantity
units String Quantity unit
value Price Stock value

Warehouse List

GET https://api-connec.maestrano.com/api/v2/:group_id/warehouses
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "warehouses": [
    {
      "id": "3f58a011-5102-0132-65ff-600308937d74",
      "group_id": "cld-f4g8r2g",
      "created_at": "2014-11-18T03:38:13Z",
      "updated_at": "2014-11-18T03:38:13Z",
      "code": "WH012",
      "status": "ACTIVE",
      "name": "NYC warehouse",
      "description": "Storage of toys and games",
      "primary": true,
      "capacity": 150,
      "units": "box",
      "latitude": 40.7127,
      "longitude": 74.0059,
      "address": {
        "shipping": {
          "line1": "279 Church St",
          "city": "New York",
          "region": "NY",
          "postal_code": "10013",
          "country": "US"
        }
      },
      "phone": {
        "landline": "+1-212-775-0345"
      },
      "total_value": {
        "total_amount": 330,
        "net_amount": 300,
        "tax_amount": 30,
        "tax_rate": 10,
        "currency": "USD"
      },
      "warehouse_stocks": [
        {
          "id": "234hj2k432",
          "status": "ACTIVE",
          "item_id": "8u78a011-5102-0132-65ff-600308937d12",
          "quantity": 10,
          "units": "box",
          "value": {
            "total_amount": 33,
            "net_amount": 30,
            "tax_amount": 3,
            "tax_rate": 10,
            "currency": "USD"
          }
        }
      ]
    }
  ]
}

Get Warehouse
GET/api/v2/:group_id/warehouses

Get the list of warehouses.


POST https://api-connec.maestrano.com/api/v2/:group_id/warehouses
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "warehouses": {
    "name": "Airport warehouse"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "warehouses": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "code": "WH013",
    "name": "Airport warehouse"
  }
}

Create New Warehouse
POST/api/v2/:group_id/warehouses

Create a new warehouse.


Warehouse

GET https://api-connec.maestrano.com/api/v2/:group_id/warehouses/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "warehouses": {
    "id": "3f58a011-5102-0132-65ff-600308937d74",
    "group_id": "cld-f4g8r2g",
    "created_at": "2014-11-18T03:38:13Z",
    "updated_at": "2014-11-18T03:38:13Z",
    "code": "WH012",
    "status": "ACTIVE",
    "name": "NYC warehouse",
    "description": "Storage of toys and games",
    "primary": true,
    "capacity": 150,
    "units": "box",
    "latitude": 40.7127,
    "longitude": 74.0059,
    "address": {
      "shipping": {
        "line1": "279 Church St",
        "city": "New York",
        "region": "NY",
        "postal_code": "10013",
        "country": "US"
      }
    },
    "phone": {
      "landline": "+1-212-775-0345"
    },
    "total_value": {
      "total_amount": 330,
      "net_amount": 300,
      "tax_amount": 30,
      "tax_rate": 10,
      "currency": "USD"
    },
    "warehouse_stocks": [
      {
        "id": "234hj2k432",
        "status": "ACTIVE",
        "item_id": "8u78a011-5102-0132-65ff-600308937d12",
        "quantity": 10,
        "units": "box",
        "value": {
          "total_amount": 33,
          "net_amount": 30,
          "tax_amount": 3,
          "tax_rate": 10,
          "currency": "USD"
        }
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Warehouse
GET/api/v2/:group_id/warehouses/{id}

Get a single warehouse.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The warehouse ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/warehouses/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "warehouses": {
    "name": "NYC warehouse"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "warehouses": {
    "id": "3f58a011-5102-0132-65ff-600308937d74",
    "group_id": "cld-f4g8r2g",
    "created_at": "2014-11-18T03:38:13Z",
    "updated_at": "2014-11-18T03:38:13Z",
    "code": "WH012",
    "status": "ACTIVE",
    "name": "NYC warehouse",
    "description": "Storage of toys and games",
    "primary": true,
    "capacity": 150,
    "units": "box",
    "latitude": 40.7127,
    "longitude": 74.0059,
    "address": {
      "shipping": {
        "line1": "279 Church St",
        "city": "New York",
        "region": "NY",
        "postal_code": "10013",
        "country": "US"
      }
    },
    "phone": {
      "landline": "+1-212-775-0345"
    },
    "total_value": {
      "total_amount": 330,
      "net_amount": 300,
      "tax_amount": 30,
      "tax_rate": 10,
      "currency": "USD"
    },
    "warehouse_stocks": [
      {
        "id": "234hj2k432",
        "status": "ACTIVE",
        "item_id": "8u78a011-5102-0132-65ff-600308937d12",
        "quantity": 10,
        "units": "box",
        "value": {
          "total_amount": 33,
          "net_amount": 30,
          "tax_amount": 3,
          "tax_rate": 10,
          "currency": "USD"
        }
      }
    ]
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Warehouse
PUT/api/v2/:group_id/warehouses/{id}

Update a single Warehouse

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The warehouse ID


Work Locations

A WorkLocation represents a physical work place of your company.

Work Locations JSON schema

GET https://api-connec.maestrano.com/api/v2/json_schema/work_locations
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "work_locations": {
      "id": "work_locations",
      "type": "array",
      "items": {
        "type": "object",
        "uniq": [
          "id",
          "code"
        ],
        "properties": {
          "resource_type": {
            "description": "Resource type name",
            "type": "string",
            "readOnly": true
          },
          "id": {
            "description": "WorkLocation UUID",
            "type": "string",
            "readOnly": true
          },
          "channel_id": {
            "type": "string",
            "description": "Channel ID (org-xxx)",
            "readOnly": true
          },
          "group_id": {
            "description": "Group ID (cld-xxx)",
            "type": "string",
            "readOnly": true
          },
          "created_at": {
            "description": "Object creation timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "description": "Object last update timestamp",
            "type": "string",
            "format": "date-time",
            "readOnly": true
          },
          "code": {
            "description": "Code, auto-generated if not specified",
            "type": "string"
          },
          "name": {
            "description": "WorkLocation name",
            "type": "string"
          },
          "description": {
            "description": "WorkLocation description",
            "type": "string"
          },
          "status": {
            "description": "[ACTIVE, INACTIVE] - Default: ACTIVE",
            "type": "string",
            "format": "enum"
          },
          "type": {
            "description": "[DEPARTMENT, BRANCH, SITE, AREA]",
            "type": "string",
            "format": "enum"
          },
          "primary": {
            "description": "WorkLocation is primary",
            "type": "boolean"
          },
          "latitude": {
            "description": "WorkLocation latitude",
            "type": "number"
          },
          "longitude": {
            "description": "WorkLocation longitude",
            "type": "number"
          },
          "address": {
            "description": "WorkLocation addresses",
            "$ref": "#/definitions/address"
          },
          "phone": {
            "description": "WorkLocation phone and fax numbers",
            "$ref": "#/definitions/phone"
          },
          "parent_work_location_id": {
            "description": "Parent #WorkLocation",
            "type": "string",
            "format": "format"
          },
          "sub_work_locations": {
            "description": "Children #WorkLocations",
            "type": "array",
            "items": {
              "type": "object",
              "uniq": [
                "id"
              ],
              "properties": {
                "id": {
                  "description": "Reference of the sub #WorkLocation",
                  "type": "string",
                  "format": "reference"
                }
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "contact_channel": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "contact_channel": {
          "type": "object",
          "properties": {
            "skype": {
              "description": "Skype account",
              "type": "string"
            }
          }
        }
      }
    },
    "email": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "address": {
              "description": "Primary email address",
              "type": "string"
            },
            "address2": {
              "description": "Secondary email address",
              "type": "string"
            }
          }
        }
      }
    },
    "address": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "website": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "email_group": {
          "type": "object",
          "properties": {
            "url": {
              "description": "Primary website url",
              "type": "string"
            },
            "url2": {
              "description": "Secondary website url",
              "type": "string"
            }
          }
        }
      }
    },
    "phone": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "address": {
          "type": "object",
          "properties": {
            "landline": {
              "description": "Primary phone number",
              "type": "string"
            },
            "landline2": {
              "description": "Secondary phone number",
              "type": "string"
            },
            "mobile": {
              "description": "Primary mobile number",
              "type": "string"
            },
            "mobile2": {
              "description": "Secondary mobile number",
              "type": "string"
            },
            "fax": {
              "description": "Primary fax number",
              "type": "string"
            },
            "fax2": {
              "description": "Secondary fax number",
              "type": "string"
            },
            "pager": {
              "description": "Primary pager number",
              "type": "string"
            },
            "pager2": {
              "description": "Secondary pager number",
              "type": "string"
            }
          }
        }
      }
    },
    "price": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "definitions": {
        "price": {
          "type": "object",
          "properties": {
            "total_amount": {
              "description": "Total amount including taxes",
              "type": "number"
            },
            "net_amount": {
              "description": "Net amount excluding taxes",
              "type": "number"
            },
            "tax_amount": {
              "description": "Total tax amount",
              "type": "number"
            },
            "tax_rate": {
              "description": "Applicable tax rate",
              "type": "number"
            },
            "currency": {
              "description": "Price currency (defaults to Company currency)",
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Get schema
GET/api/v2/json_schema/work_locations

Attributes

Field Type Description
resource_type String Resource type name
id String WorkLocation UUID
channel_id String Channel ID (org-xxx)
group_id String Group ID (cld-xxx)
created_at Date Time Object creation timestamp
updated_at Date Time Object last update timestamp
code String Code, auto-generated if not specified
name String WorkLocation name
description String WorkLocation description
status Enum [ACTIVE, INACTIVE] - Default: ACTIVE
type Enum [DEPARTMENT, BRANCH, SITE, AREA]
primary Boolean WorkLocation is primary
latitude Number WorkLocation latitude
longitude Number WorkLocation longitude
address Address WorkLocation addresses
phone Phone WorkLocation phone and fax numbers
parent_work_location_id Format Parent WorkLocation
sub_work_locations Array Children WorkLocations
WorkLocations SubWorkLocations attributes
Field Type Description
id Reference Reference of the sub WorkLocation

WorkLocation List

GET https://api-connec.maestrano.com/api/v2/:group_id/work_locations
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "work_locations": [
    {
      "id": "3f58a011-5102-0132-65ff-600308937d74",
      "group_id": "cld-f4g8r2g",
      "created_at": "2014-11-18T03:38:13Z",
      "updated_at": "2014-11-18T03:38:13Z",
      "code": "WL012",
      "name": "NYC office",
      "description": "New York City Office, head os US operations",
      "status": "CURRENT",
      "type": "BRANCH",
      "primary": true,
      "latitude": 40.7127,
      "longitude": 74.0059,
      "parent_work_location_id": "222cb8f1-5503-0133-9e89-56847afe9111",
      "sub_work_locations": [
        {
          "id": "398cb8f1-5503-0133-9e89-56847afe9799"
        },
        {
          "id": "3990d7a0-5503-0133-9e8f-56847afe9799"
        }
      ],
      "address": {
        "shipping": {
          "line1": "279 Church St",
          "city": "New York",
          "region": "NY",
          "postal_code": "10013",
          "country": "US"
        }
      },
      "phone": {
        "landline": "+1-212-775-0345"
      }
    }
  ]
}

Get WorkLocation
GET/api/v2/:group_id/work_locations

Get the list of work_locations.


POST https://api-connec.maestrano.com/api/v2/:group_id/work_locations
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "work_locations": {
    "name": "San Diego Office"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "work_locations": {
    "id": "e32303c1-5102-0132-661e-600308937d74",
    "group_id": "cld-4d7f86",
    "created_at": "2014-12-18T03:42:45Z",
    "updated_at": "2014-12-18T03:42:45Z",
    "code": "WL013",
    "name": "San Diego Office"
  }
}

Create New WorkLocation
POST/api/v2/:group_id/work_locations

Create a new work location.


WorkLocation

GET https://api-connec.maestrano.com/api/v2/:group_id/work_locations/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "work_locations": {
    "id": "3f58a011-5102-0132-65ff-600308937d74",
    "group_id": "cld-f4g8r2g",
    "created_at": "2014-11-18T03:38:13Z",
    "updated_at": "2014-11-18T03:38:13Z",
    "code": "WL012",
    "name": "NYC office",
    "description": "New York City Office, head os US operations",
    "status": "CURRENT",
    "primary": true,
    "latitude": 40.7127,
    "longitude": 74.0059,
    "address": {
      "shipping": {
        "line1": "279 Church St",
        "city": "New York",
        "region": "NY",
        "postal_code": "10013",
        "country": "US"
      }
    },
    "phone": {
      "landline": "+1-212-775-0345"
    }
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get WorkLocation
GET/api/v2/:group_id/work_locations/{id}

Get a single work location.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The work_location ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/work_locations/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "work_locations": {
    "name": "San Diego office"
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "work_locations": {
    "id": "3f58a011-5102-0132-65ff-600308937d74",
    "group_id": "cld-f4g8r2g",
    "created_at": "2014-11-18T03:38:13Z",
    "updated_at": "2014-11-18T03:38:13Z",
    "code": "WL012",
    "name": "NYC office",
    "description": "New York City Office, head os US operations",
    "status": "CURRENT",
    "primary": true,
    "latitude": 40.7127,
    "longitude": 74.0059,
    "address": {
      "shipping": {
        "line1": "279 Church St",
        "city": "New York",
        "region": "NY",
        "postal_code": "10013",
        "country": "US"
      }
    },
    "phone": {
      "landline": "+1-212-775-0345"
    }
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an WorkLocation
PUT/api/v2/:group_id/work_locations/{id}

Update a single WorkLocation

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The work_location ID


Developer Preview | Custom Entities

This feature is still under development and specifications may be updated in the future

Custom entity types can be created on the fly when they are not covered by the existing Connec! data model.

The standard CRUD operations are available on the endpoint /api/v2/[CHANNEL]/[ENTITY TYPE].

All the attributes can be added and updated dynamically.

For instance, a collection of Fruits can be manged as described below.

Fruits List

GET https://api-connec.maestrano.com/api/v2/:group_id/fruits
Responses200
Headers
Content-Type: application/vnd.api+json
Body
{
  "fruits": [
    {
      "id": "f03fd761-cf16-0134-5ab2-74d43510c326",
      "resource_type": "fruits",
      "created_at": "2017-02-07T03:53:41Z",
      "updated_at": "2017-02-07T03:54:19Z",
      "name": "Banana",
      "colour": "Yellow",
      "quantity": 12,
      "group_id": "org-fbba",
      "channel_id": "org-fbba"
    }
  ]
}

Get Fruits
GET/api/v2/:group_id/fruits

Get the list of fruits.


POST https://api-connec.maestrano.com/api/v2/:group_id/fruits
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "fruits": {
    "name": "Banana",
    "colour": "Yellow"
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json
Body
{
  "fruits": {
    "id": "f03fd761-cf16-0134-5ab2-74d43510c326",
    "resource_type": "fruits",
    "created_at": "2017-02-07T03:53:41Z",
    "updated_at": "2017-02-07T03:53:41Z",
    "name": "Banana",
    "colour": "Yellow",
    "group_id": "org-fbba",
    "channel_id": "org-fbba"
  }
}

Create New Fruit
POST/api/v2/:group_id/fruits

Create a new fruit.


Fruit

GET https://api-connec.maestrano.com/api/v2/:group_id/fruits/e32303c1-5102-0132-661e-600308937d74
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "fruits": {
    "id": "f03fd761-cf16-0134-5ab2-74d43510c326",
    "resource_type": "fruits",
    "created_at": "2017-02-07T03:53:41Z",
    "updated_at": "2017-02-07T03:54:19Z",
    "name": "Banana",
    "colour": "Yellow",
    "quantity": 12,
    "group_id": "org-fbba",
    "channel_id": "org-fbba"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Get Fruit
GET/api/v2/:group_id/fruits/{id}

Get a single fruit.

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The fruit ID


PUT https://api-connec.maestrano.com/api/v2/:group_id/fruits/e32303c1-5102-0132-661e-600308937d74
Requestsexample 1
Headers
Content-Type: application/vnd.api+json
Body
{
  "fruits": {
    "quantity": 12
  }
}
Responses200404
Headers
Content-Type: application/vnd.api+json
Body
{
  "fruits": {
    "id": "f03fd761-cf16-0134-5ab2-74d43510c326",
    "resource_type": "fruits",
    "created_at": "2017-02-07T03:53:41Z",
    "updated_at": "2017-02-07T03:54:19Z",
    "name": "Banana",
    "colour": "Yellow",
    "quantity": 12,
    "group_id": "org-fbba",
    "channel_id": "org-fbba"
  }
}
Headers
Content-Type: application/vnd.api+json
Body
{
  "errors": [
    {
      "id": "e33303c1-5102-0142-661e-600308937d84",
      "status": "404",
      "code": "not-found",
      "title": "Resource not found"
    }
  ]
}

Update an Fruit
PUT/api/v2/:group_id/fruits/{id}

Update a single Fruit

URI Parameters
HideShow
id
string (required) Example: e32303c1-5102-0132-661e-600308937d74

The fruit ID


Generated by aglio on 13 Nov 2017