Helm CONNECT API Documentation
Overview & Policies
Please read all Overview and Policies sections carefully prior to using Helm CONNECT APIs. We reserve the right to revoke access to our APIs if we observe inappropriate behavior.
API Authorization
All API HTTP requests must have the following headers attached
API-Key: <key>,
Content-Type: application/json
The key comes from the API key management section of the Users App.
User Defined Fields
Purpose
- Allow users to update existing user defined fields to track information.
Data Model
-
A JSON object contains a list of user defined fields. Each user defined field contains a name and value(s).
-
Example Usage:
"UserDefined": { "Height": 123, "Name": "Helm Operation", .... }
User Defined Field Types
-
Text
-
DataType:
<string>
-
Example Usage:
"MMSI": "MIDxxxxxx"
-
-
Number
-
DataType:
<decimal>
-
Example Usage:
"Gross Tonnage": 134
-
-
Bool
-
DataType:
<bool>
-
Example Usage:
"Overdue": true
- Note: If a bool field is defined, but has never had its value set, Helm CONNECT will consider this as
false
.
-
-
Date
-
DataType:
<date>
-
Example Usage:
"HireDate": "2082-01-16T00:00:00-00:00"
- Note: The time does get saved as provided but will be not visible in Helm CONNECT.
-
-
Date and time
-
DataType:
<date>
-
Example Usage:
"ArriveDateTime": "2017-08-18T00:05:00-07:00"
-
-
Select Box
-
DataType:
<GUID>
or<String>
-
Example Usage:
"Direction": "West"
-
-
Multi Selectbox
-
DataType:
<GUID>
or<String>
-
Example Usage:
"OperatingAreas": "4E0D8981-7FA8-6155-54E5-54E5662F795E,4F60597D-68D2-7D66-4F60-62CD62CD624B"
- Note: values are separated by comma(,)
-
Account Type
URI
api/v2/public/AccountTypes
Supported Verbs
GET
- Find Account Types.
Data Models
Account Type Model
{
"Id": <GUID>,
"Name": <string>,
"IsCustomer": <boolean>,
"IsAgent": <boolean>,
"IsCompetitor": <boolean>
}
Account Type Fields
-
Id
-
DataType: Guid
-
Purpose: To uniquely identify an account type.
-
-
Name
-
DataType: string [max. 200 char]
-
Filterable: true
-
Purpose: Specifies the name of an account type.
-
-
IsCustomer
-
DataType: Boolean
-
Required: false
-
Purpose: when true, accounts will be shown in the Customer list on an order.
-
-
IsAgent
-
DataType: Boolean
-
Required: false
-
Purpose: when true, accounts will be shown in the Agent list on an order.
-
-
IsCompetitor
-
DataType: Boolean
-
Required: false
-
Purpose: when true, accounts will be shown in the Awarded To list on an order with the accounts that belong to your own companies.
-
Error Model
{
"ErrorCode": <integer>,
"ErrorMessage": <string>
}
Error Model Fields
-
ErrorCode
-
DataType: integer
-
Purpose: An integer that uniquely identifies this type of error.
-
-
ErrorMessage
-
DataType: string
-
Purpose: A message which describes what the error means.
-
Find Account Types
URI
GET api/v2/public/AccountTypes
Example Usage
GET api/v2/public/AccountTypes
Required Parameters
- None
Optional Parameters
-
page
:-
Data Type: integer
-
Parameter Type: query string
-
Default Value: 1
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
GET api/v2/public/AccountTypes?page=2
-
-
$filter
:-
Data Type: string
-
Parameter Type: query string
-
Default Value: empty
-
Purpose: Controls filtering the returned data. See fields that have “Filterable: true”.
-
Example Usage:
// Get Account Types with Name equal to "Agent" GET api/v2/public/AccountTypes?$filter=Name eq 'Agent'
-
Return Value
Action Accepted
Returns an array containing the requested Account Types in the format of the Account Types Model.
{
"Page": <integer>,
"Next": <URI>,
"Results": <Array of Account Type Model>
}
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Required Permissions
Either one of:
- Setup > Jobs > Sales > Read
- Setup > Jobs > Sales > Edit
Activities
Create/Update Activity
URI
api/v1/core/activities/CreateOrUpdateActivity
Supported Verbs
- POST: insert or update an Activity.
Required Parameters
-
Activity Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Activity Model to be created.
-
Data Model
Activity Model
{
"Id": <Guid>,
"VesselId": <GUID>,
"ActivityTypeId": <GUID>,
"FromLocationId": <Guid>,
"ToLocationId": <Guid>,
"PlannedStartDate": <date>,
"PlannedEndDate": <date>,
"StartDate": <date>,
"EndDate": <date>,
"RecordedByPersonId": <GUID>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Activity Object Fields
-
Id
-
DataType: Guid
-
Required: false when creating new data; true when updating existing data
-
Purpose: Update the uniquely matching Activity
-
-
VesselId
-
DataType: Guid for the Activity’s vessel.
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Activity’s vessel.
-
-
ActivityTypeId
-
DataType: Guid for the Activity type.
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Activity type.
-
-
FromLocationId
-
DataType: Guid for the Activity’s Location From.
-
Required: false
-
Purpose: Sets the Activity’s Location From.
-
-
ToLocationId
-
DataType: Guid for the Activity’s Location To.
-
Required: false
-
Purpose: Sets the Activity’s Location To.
-
-
PlannedStartDate
-
DataType: date
-
Required: Either PlannedStartDate or StartDate is required when creating new data
-
Purpose: Sets the Activity’s planned Start Date. Only one of PlannedStartDate and StartDate may be set.
-
-
PlannedEndDate
-
DataType: date
-
Required: Either PlannedEndDate or EndDate is required when creating new data
-
Purpose: Sets the Activity’s planned End Date. Only one of PlannedEndDate and EndDate may be set.
-
-
StartDate
-
DataType: date
-
Required: Either PlannedStartDate or StartDate is required when creating new data
-
Purpose: Sets the Activity’s actual Start Date. Only one of PlannedStartDate and StartDate may be set.
-
-
EndDate
-
DataType: date
-
Required: Either PlannedEndDate or EndDate is required when creating new data
-
Purpose: Sets the Activity’s actual End Date. Only one of PlannedEndDate and EndDate may be set.
-
-
RecordedByPersonId
-
DataType: Guid for the Activity Recorded By Person.
-
Required: false
-
Purpose: Sets who recorded the Activity.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Activity. Will be set to null if not specified.
-
Return Value
Action Accepted
{
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>,
"Details": <string>
},
....
]
}
-
Id: Guid for the new Activity.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
-
Details Additional information about the error.
Action Rejected
"Data": <Array>
- Data: Error Message
Find Activities
URI
api/v1/core/activities/FindActivities
Supported Verbs
- GET: return a filtered list of Activities. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/core/activities/FindActivities?page=1
-
Optional Parameters
-
Id:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return the Activity with the given Id
-
Example Usage:
api/v1/core/activities/FindActivities?page=1&Id=d21d73fb-bb69-11e8-8102-00155d040945
-
-
VesselId:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Activities with the given VesselId
-
Example Usage:
api/v1/core/activities/FindActivities?page=1&VesselId=d21d73fb-bb69-11e8-8102-00155d040945
-
-
ChangedSince:
-
Data Type: datetime
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return activities that have been modified or created since the datetime.
-
Example Usage
api/v1/core/activities/FindActivities?page=1&ChangedSince=2016-03-10T14:23:00-08:00
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <Guid>,
"VesselId": <GUID>,
"ActivityTypeId": <GUID>,
"FromLocationId": <Guid>,
"ToLocationId": <Guid>,
"PlannedStartDate": <date>,
"PlannedEndDate": <date>,
"StartDate": <date>,
"EndDate": <date>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
},
...
]
}
}
Archive Activity
URI
api/v1/core/activities/ArchiveActivity
Supported Verbs
- POST: Archive an activity.
Required Parameters
-
Archive Activity Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Activity Id to be archived.
-
Data Model
Archive Activity Model
{
"Id": <Guid>
}
Archive Activity Object Fields
-
Id
-
DataType: Guid
-
Required: true
-
Purpose: Archives the uniquely matching Activity
-
Return Value
Action Accepted
{
"ActionType": "Archive",
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>
"Message": <string>
},
...
]
}
-
ActionType: Will always be ‘Archive’.
-
Id: Guid for the Activity.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message
Create/Update Job Activity
URI
api/v1/jobs/activities/CreateOrUpdateJobActivity
Supported Verbs
- POST: insert or update a job activity.
Required Parameters
-
Job Activity Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Job Activity Model to be created.
-
Data Model
Job Activity Model
{
"Id": <Guid>,
"JobId": <GUID>,
"ActivityTypeId": <GUID>,
"FromLocationId": <Guid>,
"ToLocationId": <Guid>,
"PlannedStartDate": <date>,
"PlannedEndDate": <date>,
"StartDate": <date>,
"EndDate": <date>,
"IsStartDateAutomatic": <boolean>,
"IsEndDateAutomatic": <boolean>,
"RecordedByPersonId": <GUID>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Job Activity Object Fields
-
Id
-
DataType: Guid
-
Required: false when creating new data; true when updating existing data
-
Purpose: Update the uniquely matching Job Activity
-
-
JobId
-
DataType: Guid for the Activity’s job.
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Activity’s job.
-
-
ActivityTypeId
-
DataType: Guid for the Activity type.
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Activity type.
-
-
FromLocationId
-
DataType: Guid for the Activity’s Location From.
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Activity’s Location From. If there are pre-existing job activities, the From Location must match the To Location of the last pre-existing activity. You can only change the From Location of the first job activity.
-
-
ToLocationId
-
DataType: Guid for the Activity’s Location To.
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Activity’s Location To. You can only change the To Location of the last job activity.
-
-
PlannedStartDate
-
DataType: date
-
Required: Either PlannedStartDate or StartDate is required when creating new data; false when updating existing data
-
Purpose: Sets the Activity’s planned Start Date. Only one of PlannedStartDate and StartDate may be set. If there are pre-existing job activities, the Start Date must match the End Date of the last pre-existing job activity.
-
-
PlannedEndDate
-
DataType: date
-
Required: Either PlannedEndDate or EndDate is required when creating new data; false when updating existing data
-
Purpose: Sets the Activity’s planned End Date. Only one of PlannedEndDate and EndDate may be set.
-
-
StartDate
-
DataType: date
-
Required: Either PlannedStartDate or StartDate is required when creating new data; false when updating existing data
-
Purpose: Sets the Activity’s actual Start Date. Only one of PlannedStartDate and StartDate may be set. If there are pre-existing job activities, the Start Date must match the End Date of the last pre-existing job activity. You can only change the Start Date of the first job activity.
-
-
EndDate
-
DataType: date
-
Required: Either PlannedEndDate or EndDate is required when creating new data; false when updating existing data
-
Purpose: Sets the Activity’s actual End Date. Only of one PlannedEndDate and EndDate may be set. You can only change the End Date of the last job activity.
-
-
IsStartDateAutomatic
-
DataType: boolean
-
Required: false
-
Purpose: Sets the Activity’s IsEndDateAutomatic
-
-
IsEndDateAutomatic
-
DataType: boolean
-
Required: false
-
Purpose: Sets the Activity’s IsEndDateAutomatic
-
-
RecordedByPersonId
-
DataType: Guid for the Recorded By Person
-
Required: false
-
Purpose: Sets the Activity’s RecordedByPerson.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Activity. Will be set to null if not specified.
-
Return Value
Action Accepted
{
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>,
"Details": <string>
},
....
]
}
-
Id: Guid for the new Job Activity.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
-
Details: Additional information about the error.
Action Rejected
"Data": <Array>
- Data: Error Message
Find Job Activities
URI
api/v1/jobs/activities/FindJobActivities
Supported Verbs
- GET: return a filtered list of job activities. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/jobs/activities/FindJobActivities?page=1
-
Optional Parameters
-
Id:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return the Job Activity with the given Id
-
Example Usage:
api/v1/jobs/activities/FindJobActivities?page=1&Id=d21d73fb-bb69-11e8-8102-00155d040945
-
-
JobId:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Job Activities with the given JobId
-
Example Usage:
api/v1/jobs/activities/FindJobActivities?page=1&JobId=d21d73fb-bb69-11e8-8102-00155d040945
-
-
ChangedSince:
-
Data Type: datetime
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return job activities that have been modified or created since the datetime.
-
Example Usage
api/v1/jobs/activities/FindJobActivities?page=1&ChangedSince=2016-03-10T14:23:00-08:00
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"JobId": <GUID>,
"ActivityTypeId": <GUID>,
"FromLocationId": <GUID>,
"ToLocationId": <GUID>,
"PlannedStartDate": <date>,
"PlannedEndDate": <date>,
"StartDate": <date>,
"EndDate": <date>,
"IsStartDateAutomatic": <boolean>,
"IsEndDateAutomatic": <boolean>,
"RecordedByPersonId": <GUID>,
"UserDefined": UserDefinedDataModel (see User Defined Fields section for more details)
},
...
]
}
}
Activity Type
URI
api/v2/public/ActivityTypes
Supported Verbs
GET
- Find Activity Types.
Data Models
Activity Type Model
{
"Id": <GUID>,
"Name": <string>,
"AccountingCode": <string>,
"Type": <string>,
"Tags": <Array>
[
{
"Id": <GUID>,
"Name": <string>,
},
...
]
}
Activity Type Fields
-
Id
-
DataType: Guid
-
Purpose: To uniquely identify an activity type.
-
-
Name
-
DataType: string [max. 200 char]
-
Filterable: true
-
Purpose: Specifies the name of an activity type.
-
-
AccountingCode
-
DataType: string [max. 50 char]
-
Filterable: true
-
Purpose: Specifies the name of an activity type.
-
-
Type
-
DataType: string
-
Filterable: true
-
Purpose: If not null, indicates whether the activity type is “Primary”, “RunningFrom”, or “RunningTo”.
-
-
Tags
-
DataType: Array
-
Purpose: Defines the tags this activity type has.
-
Fields:
- Id
<GUID>
- Name
<string>
- Id
-
Error Model
{
"ErrorCode": <integer>,
"ErrorMessage": <string>
}
Error Model Fields
-
ErrorCode
-
DataType: integer
-
Purpose: An integer that uniquely identifies this type of error.
-
-
ErrorMessage
-
DataType: string
-
Purpose: A message which describes what the error means.
-
Find Activity Types
URI
GET api/v2/public/ActivityTypes
or
GET api/v2/public/ActivityTypes/{Id}
Example Usage
// Get a paginated response of all activity types
GET api/v2/public/ActivityTypes
// Get a specific activity type by Id
GET api/v2/public/ActivityTypes/d21d73fb-bb69-11e8-8102-00155d040945
Required Parameters
- None
Optional Parameters
-
page
:-
Data Type: integer
-
Parameter Type: query string
-
Default Value: 1
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
GET api/v2/public/ActivityTypes?page=2
-
-
$filter
:-
Data Type: string
-
Parameter Type: query string
-
Default Value: empty
-
Purpose: Controls filtering the returned data. See fields that have “Filterable: true”.
-
Example Usage:
// Get Activity Types with Name equal to "Sailing" GET api/v2/public/ActivityTypes?$filter=Name eq 'Sailing'
-
Return Value
Action Accepted
Returns an array containing the requested Activity Types in the format of the Activity Types Model.
{
"Page": <integer>,
"Next": <URI>,
"Results": <Array of Activity Type Model>
}
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Required Permissions
- Setup > Events > Activity Types
Assets
Update Asset
URI
api/v1/core/assets/CreateOrUpdateAsset
Supported Verbs
- POST: update an asset
Required Parameters
-
Asset Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Asset Model to be updated.
-
Data Model
Asset Model
{
"Id": <GUID>,
"Name": <string>,
"ShortName": <string>,
"AccountingCode": <string>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Asset Object Fields
-
Id
-
DataType: GUID
-
Required: true
-
Purpose: Identify the asset to update
-
-
Name
-
DataType: string [max. 400 char]
-
Required: false
-
Purpose: Sets the Name for the Asset.
-
-
ShortName
-
DataType: string [max. 100 char]
-
Required: false
-
Purpose: Sets the ShortName for the Asset.
-
-
AccountingCode
-
DataType: string [max. 50 char]
-
Required: false
-
Purpose: Sets the AccountingCode for the Asset.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined fields for the Asset.
-
Return Value
Action Accepted
{
"Data":
{
"ActionType": <string>,
"Id": <GUID>
}
}
-
ActionType: Insert (Not implemented) or Update
-
Id: Guid of the updated Asset
Find Assets
URI
api/v1/core/assets/FindAssets
Supported Verbs
- GET: return a filtered list of Assets. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/core/assets/FindAssets?page=1
-
Optional Parameters
-
Name:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: Will return the assets with a Name that contains the given string.
-
Example Usage:
api/v1/core/assets/FindAssets?page=1&Name=Frigate
-
-
ShortName:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: Will return the assets with a ShortName that contains the given string.
-
Example Usage:
api/v1/core/assets/FindAssets?page=1&ShortName=HM
-
-
AccountingCode:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: Will return the assets with AccountingCode that contains the given string.
-
Example Usage:
api/v1/core/assets/FindAssets?page=1&AccountingCode=142
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"Name": <string>,
"ShortName": <string>,
"AccountingCode": <string>,
"VesselTypeNames": <string>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
}
...
]
}
}
Company
Create/Update Company
URI
api/v1/jobs/companies/CreateOrUpdateCompany
Supported Verbs
- POST: insert and update one or more companies.
Required Parameters
-
Company Model
-
Data Type: Array of JSON Objects (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one or more Company Model to be created or updated.
-
Data Model
Company Model
[
{
"Id": <GUID>,
"Name": <string>,
"ShortName": <string>,
"ExternalSystemCode": <string>,
"IsMyCompany": <boolean>,
"IsActive": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
},
....
]
Company Object Fields
-
Id
-
DataType: Guid
-
Required: false when creating new data; true when updating existing data
-
Purpose: update the uniquely matching Company. The Company must be active.
-
-
Name
-
DataType: string
-
Required: true
-
Purpose: Sets the Name for the Company.
-
-
ShortName
-
DataType: string
-
Required: false
-
Purpose: Sets the ShortName for the Company. Will be set to null if not specified.
-
-
ExternalSystemCode
-
DataType: string
-
Required: false
-
Purpose: Sets the ExternalSystemCode for the Company. Will be set to null if not specified.
-
-
IsMyCompany
-
DataType: boolean
-
Required: false
-
Default value: false
-
Purpose: Sets the IsMyCompany for the Company. Will be set to false if not specified.
-
-
IsActive
-
DataType: boolean
-
Required: false
-
Default value: true
-
Purpose: Sets whether the Company is Archived. Will be set to false if not specified.
-
-
UserDefined
-
DataType: User Defined Data Model (see User User Defined Fields for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Company. Will be set to null if not specified.
-
Return Value
With errors
{
"Data":
[
{
"Name": <string>,
"Errors":
[
{
"Message": <string>,
"Entity": <string>,
"Details": <string>
},
....
]
}
]
}
Without errors
{
"Data":
{
"Created": <Integer>,
"Updated": <Integer>
}
}
-
Created: The number of Companies created.
-
Updated: The number of Companies updated.
Create/Update Account
URI
api/v1/jobs/companies/CreateOrUpdateCompanyAccount
Supported Verbs
- POST: insert and update one or more Company accounts.
Required Parameters
-
Account Model
-
Data Type: Array of JSON Objects (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one or more Account Model to be created or update.
-
Optional Parameters
-
addNewCompany
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true and company can’t be found, it will create new company based on the information provided.
-
Note: Company’s Name is required when creating New Company
-
Example Usage:
api/v1/jobs/companies/CreateOrUpdateCompanyAccount?addNewCompany=true
-
-
asRequest
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, instead of creating or updating an Account directly, a Request for those changes will be created. This creates new request Accounts which are referenced by the Requests that were created. Requested accounts will have the RequestedOn field set to the current datetime.
-
Example Usage:
api/v1/jobs/companies/CreateOrUpdateCompanyAccount?asRequest=true
-
Data Model
Account Model
[
{
"Id": <GUID>,
"Name": <string>,
"Company":
{
"Id": <GUID>,
"Name": <string>,
"ShortName": <string>,
"ExternalSystemCode": <string>,
"IsMyCompany": <boolean>,
"IsActive": <boolean>,
"UserDefined":User Defined Data Model (see User Defined Fields section for more details)
},
"Division":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"AccountNumber": <string>,
"AccountType": <string>,
"AccountTypeId": <GUID>,
"IsAR": <boolean>,
"IsAP": <boolean>,
"IsBlocked": <boolean>,
"IsActive": <boolean>
},
....
]
Account Object Fields
-
Id
-
DataType: Guid
-
Required: false when creating new data; true when updating existing data
-
Purpose: update the uniquely matching Account.
-
-
Name
-
DataType: string
-
Required: true
-
Purpose: Sets the Name for the Account.
-
-
Company
-
DataType: JSON Object
-
Required: true
-
Purpose: Sets the Company of the Account.
-
Function: Selects the Company that uniquely matches the given Id, Name, Shortname and ExternalSystemCode
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
ShortName
<string>
-
ExternalSystemCode
<string>
-
IsMyCompany
<bool>
-
IsActive
<bool>
-
UserDefined
<string>
-
-
-
Division
-
DataType: JSON Object
-
Required: true
-
Purpose: Sets the DivisionId of the Account.
-
Function: Selects the Division that uniquely matches the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
ExternalSystemCode
<string>
-
-
-
AccountNumber
-
DataType: string
-
Required: true
-
Purpose: Sets the AccountName for the Account.
-
-
AccountType
-
DataType: string
-
Required: true
-
Purpose: Sets the AccountType for the Account.
-
-
AccountTypeId
-
DataType: Guid
-
Required: true when AccountType is not set
-
Purpose: Sets the AccountTypeId for the Account.
-
-
IsAR
-
DataType: boolean
-
Required: false
-
Default value: true
-
Purpose: Sets the IsAR for the Account.
-
-
IsAP
-
DataType: boolean
-
Required: false
-
Default value: false
-
Purpose: Sets the IsAP for the Account.
-
-
IsBlocked
-
DataType: boolean
-
Required: false
-
Default value: false
-
Purpose: Sets the IsBlocked for the Account.
-
-
IsActive
-
DataType: boolean
-
Required: false
-
Default value: true
-
Purpose: Sets the IsActive for the Account.
-
Return Value
With errors
{
"Data":
[
{
"Name": <Array>,
"Errors":
[
{
"Entity": <string>
},
....
]
}
]
}
Without errors
{
"Data":
{
"Created": <Integer>,
"Updated": <Integer>,
"CompanyCreated": <Integer>
}
}
-
Created: The number of Company Accounts created.
-
Updated: The number of Company Accounts updated.
-
CompanyCreated: The number of Companies created.
Create/Update Account Address
URI
api/v1/jobs/companies/CreateOrUpdateAccountAddress
Supported Verbs
- POST: insert and update one or more Account Addresses.
Required Parameters
-
Account Address Model
-
Data Type: Array of JSON Objects (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one or more Account Address Model to be created or updated.
-
Data Model
Account Address Model
[
{
"Id": <GUID>,
"Account":
{
"Id": <GUID>,
"Name": <string>,
"AccountNumber": <string>
},
"Name": <string>,
"Address": <string>,
"City": <string>,
"Zipcode": <string>,
"State": <string>,
"Country": <string>,
"Email": <string>,
"ExternalSystemCode": <string>,
"Areas":
[
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
....
]
},
....
]
Account Address Object Fields
-
Id
-
DataType: Guid
-
Required: false when creating new data; true when updating existing data
-
Purpose: update the uniquely matching Account Address.
-
-
Account
-
DataType: JSON Object
-
Required: true
-
Purpose: Sets the Account of the Account Address.
-
Function: Selects the Account that uniquely matches the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
AccountNumber
<string>
-
-
-
Name
-
DataType: string
-
Required: false
-
Purpose: Sets the Name for the Account Address. Will be set to null if not specified.
-
-
Address
-
DataType: string
-
Required: true
-
Purpose: Sets the Address for the Account Address.
-
-
City
-
DataType: string
-
Required: true
-
Purpose: Sets the City for the Account Address.
-
-
Zipcode
-
DataType: string
-
Required: false
-
Purpose: Sets the Zipcode for the Account Address. Will be set to null if not specified.
-
-
State
-
DataType: string
-
Required: false
-
Purpose: Sets the State for the Account Address. Will be set to null if not specified.
-
-
Country
-
DataType: string
-
Required: true
-
Purpose: Sets the Country for the Account Address.
-
-
Email
-
DataType: string
-
Required: false
-
Purpose: Sets the Email for the Account Address. Will be set to null if not specified.
-
-
ExternalSystemCode
-
DataType: string
-
Required: false
-
Purpose: Sets the ExternalSystemCode for the Account Address. Will be set to null if not specified.
-
-
Areas
-
DataType: Array of JSON Objects
-
Required: false
-
Purpose: Sets the Areas for the Account Address. Will be set to null if not specified.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
AccountNumber
<string>
-
-
Return Value
With errors
{
"Data":
[
{
"Name": <Array>,
"Errors":
[
{
"Entity": <string>
},
....
]
}
]
}
Without errors
{
"Data":
{
"Created": <Integer>,
"Updated": <Integer>
}
}
-
Created: The number of Company Accounts created.
-
Updated: The number of Company Accounts updated.
Find Companies
URI
api/v1/jobs/companies/FindCompanies
Supported Verbs
- GET: return a filtered list of Companies, Account, and Account Address. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/jobs/companies/FindCompanies?page=2
-
Optional Parameters
-
SearchString:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: Will return the Companies with Name or ShortName that contains the given string.
-
Example Usage:
api/v1/jobs/companies/FindCompanies?page=1&SearchString=partOfTheName
-
-
CompanyExternalSystemCode:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: Will return the Companies with the specified external system code.
-
Example Usage:
api/v1/jobs/companies/FindCompanies?page=1&CompanyExternalSystemCode=CustomerXYZ
-
-
AccountNumber:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: Will return the Companies that contain accounts with the specified account number. Any accounts that do not have the specified account number will be omitted.
-
Example Usage:
api/v1/jobs/companies/FindCompanies?page=1&AccountNumber=Account12345
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"Name": <string>,
"ShortName": <string>,
"ExternalSystemCode": <string>,
"IsMyCompany": <boolean>,
"IsActive": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"AccountingTerm":
{
"Name": <string>,
"NumberOfDays": <integer>,
"ExternalSystemCode": <string>
},
"Accounts": <Array>
[
{
"Id": <GUID>,
"Name": <string>,
"Division":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"AccountNumber": <string>,
"AccountType": <string>,
"AccountTypeId": <GUID>,
"IsAR": <boolean>,
"IsAP": <boolean>,
"IsBlocked": <boolean>,
"IsActive": <boolean>,
"IsRequested": <boolean>,
"AccountingTerm":
{
"Name": <string>,
"NumberOfDays": <integer>,
"ExternalSystemCode": <string>
},
"Addresses": <Array>
[
{
"Id": <GUID>,
"Name": <string>,
"Address": <string>,
"City": <string>,
"Zipcode": <string>,
"State": <string>,
"Country": <string>,
"Email": <string>,
"Areas":
[
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
....
]
},
....
]
},
....
]
},
....
]
}
}
Currency Exchange Rate
Create/Update Currency Exchange Rate
URI
api/v1/jobs/billing/CreateOrUpdateCurrencyExchangeRate
Supported Verbs
- POST: insert or update a currency exchange rate.
Required Parameters
-
Currency Exchange Rate Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Currency Exchange Rate Model to be created or updated.
-
Data Model
Currency Exchange Rate Model
{
"CurrencyType":
{
"Id": <GUID>,
"Name": <string>,
},
"EffectiveDate": <date>,
"ExchangeRate": <decimal>
}
Currency Exchange Rate Object Fields
-
CurrencyType
-
DataType: JSON Object
-
Required: true
-
Purpose: Selects the currency type whose exchange rate will be altered.
-
Function: Selects the CurrencyTypeId that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
[max. 200 char]
-
-
-
EffectiveDate
-
DataType:
<date>
-
Required: true
-
Purpose: Selects the date of the exchange rate you want to create or update. If an exchange rate already exists for this date it will be updated; otherwise a new exchange rate will be created. This parameter accepts a fully specified date but only the year, month and day will be used; the time and timezone will not be used.
-
-
ExchangeRate
-
DataType:
<decimal>
-
Required: true
-
Purpose: Sets the Exchange Rate for the currency type and date specified.
-
Return Value
Action Accepted
"Data":
{
"CurrencyTypeId": <Guid>,
"LogMessages":
[
{
"Entity": <string>,
"Message": <string>,
"Details": <string>
},
....
]
}
-
CurrencyTypeId: Guid for the currency type that exchange rates were added/updated for.
-
LogMessages: This will describe any failures that occurred when trying to find the matching entity. For example, if the CurrencyType could not be determined from your POST.
Action Rejected
"Data": <Array>
- Data: Log Messages
Delete Currency Exchange Rate
URI
api/v1/jobs/billing/DeleteCurrencyExchangeRate
Supported Verbs
- POST: delete currency exchange rate(s) on a given date.
Required Parameters
-
User Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Currency Exchange Rate Model to be deleted.
-
Data Model
Currency Exchange Rate Model
{
"CurrencyType":
{
"Id": <GUID>,
"Name": <string>,
},
"EffectiveDate": <date>
}
User Object Fields
-
CurrencyType
-
DataType: JSON Object
-
Required: true
-
Purpose: Selects the currency type whose exchange rate(s) may be deleted.
-
Function: Selects the CurrencyTypeId that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
[max. 200 char]
-
-
-
EffectiveDate
-
DataType:
<date>
-
Required: true
-
Purpose: Selects the date of the exchange rate(s) you want to delete. All exchange rates that exist for this date will be deleted. If no exchange rates exist for this date then nothing will be deleted and no error will be returned. This parameter accepts a fully specified date but only the year, month and day will be used; the time and timezone will not be used.
-
Return Value
Action Accepted
"Data":
{
"CurrencyTypeId": <Guid>,
"ExchangeRatesDeleted": <integer>,
"LogMessages":
[
{
"Entity": <string>,
"Message": <string>,
"Details": <string>
},
....
]
}
-
CurrencyTypeId: Guid for the currency type that exchange rate(s) may have been deleted for.
-
ExchangeRatesDeleted: The number of exchange rates that were deleted.
-
LogMessages: This will describe any failures that occurred when trying to find the matching entity. For example, if the CurrencyType could not be determined from your POST.
Action Rejected
"Data": <Array>
- Data: Log Messages
Divisions
Find Divisions
URI
api/v1/jobs/Divisions/FindDivisions
Supported Verbs
- GET: return a filtered list of divisions. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/jobs/Divisions/FindDivisions?page=2
-
Optional Parameters
-
SearchString:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: Will return the Divisions with Name or ShortName that contains the given string.
-
Example Usage:
api/v1/jobs/Divisions/FindDivisions?page=1&SearchString=partOfTheName
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"Name": <string>,
"ShortName": <string>,
"ExternalSystemCode": <string>,
"AccountingCode": <string>,
"DivisionType":
{
"Id": <GUID>,
"Name": <string>
},
},
...
]
}
}
Earning Code
Create/Update Earning Code
URI
api/v1/Personnel/EarningCodes/CreateOrUpdateEarningCode
Supported Verbs
- POST: insert or update an earning code.
Required Parameters
-
Earning Code Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Earning Code Model to be created or updated.
-
Data Model
Earning Code Model
{
"Id": <GUID>,
"Name": <string>,
"AccountingCode": <string>,
"QuantityType": <string>,
"DoArchive": <boolean>
}
Earning Code Object Fields
-
Id
-
DataType: GUID
-
Required: true when updating
-
Purpose: Identify the earning code to update
-
-
Name
-
DataType: string [max. 200 char]
-
Required: true
-
Purpose: Sets the Name for the Earning Code.
-
-
AccountingCode
-
DataType: string [max. 50 char]
-
Required: false
-
Purpose: Sets the AccountingCode for the Earning Code.
-
-
QuantityType
-
DataType: string [max. 20 char]
-
Required: false
-
Purpose: Sets the QuantityType for the Earning Code.
-
Accepted Value: “fixed”, “daily”, “hourly”, “amount”
-
-
DoArchive
-
DataType: boolean
-
Required: false
-
Purpose: Archive the Earning Code.
-
Note: This field will be ignored when creating a new earning code. Once archived, it can’t be reverted.
-
Return Value
Action Accepted
Data:
{
"ActionType": <string>,
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>
},
....
]
}
-
ActionType: Insert or Update
-
Id: Guid for the new earning code if ActionType is insert.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message
Find Earning Code
URI
api/v1/Personnel/EarningCodes/FindEarningCodes
Supported Verbs
- GET: return a filtered list of earning codes. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/Personnel/EarningCodes/FindEarningCodes?page=2
-
Optional Parameters
-
Name:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return earning code with Name containing the string
-
Example Usage:
api/v1/Personnel/EarningCodes/FindEarningCodes?page=2&Name=Foo
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page":
[
{
"Id": <GUID>,
"Name": <string>,
"AccountingCode": <string>,
"QuantityType": <string>
},
....
]
}
}
Action Rejected
"Data": <Array>
- Data: Error Message
Event
Create/Update Event
URI
api/v1/core/events/CreateOrUpdateEvent
Supported Verbs
- POST: insert or update an event.
Required Parameters
-
Event Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Event Model to be created.
-
Data Model
Event Model
{
"Id": <GUID>,
"Description": <string>,
"EventDate": <date>,
"EventTypeId": <GUID>,
"VesselId": <GUID>,
"SpaceId": <GUID>,
"LocationId": <GUID>,
"RecordedByPersonId": <GUID>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Event Object Fields
-
Id
-
DataType: Guid
-
Required: false when creating new data; true when updating existing data
-
Purpose: Update the uniquely matching event.
-
-
Description
-
DataType: string [max. 1000 char]
-
Required: false
-
Purpose: Sets the description for the Event.
-
-
EventDate
-
DataType: date
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Event date.
-
-
EventTypeId
-
DataType: Guid for the Event type
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Event type.
-
-
VesselId
-
DataType: Guid for the Event’s vessel.
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Event asset.
-
-
SpaceId
-
DataType: Guid for the Event’s space.
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Event space.
-
-
LocationId
-
DataType: Guid for the Event location
-
Required: false
-
Purpose: Sets the Event location.
-
-
RecordedByPersonId
-
DataType: Guid for the Event recorded by person.
-
Required: false
-
Purpose: Sets who recorded the Event.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Event. Will be set to null if not specified.
-
Return Value
Action Accepted
Data:
{
"ActionType": <string>,
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>
"Message": <string>
},
....
]
}
-
ActionType: ‘Insert or Update’.
-
Id: Guid for the new Event.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message
Find Events
URI
api/v1/core/events/FindEvents
Supported Verbs
- GET: return a filtered list of Events. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/core/events/FindEvents?page=1
-
Optional Parameters
-
Id:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return the Event with the given Id
-
Example Usage:
api/v1/core/events/FindEvents?page=1&Id=d21d73fb-bb69-11e8-8102-00155d040945
-
-
AssetId:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return the Event with the given Asset Id
-
Example Usage:
api/v1/core/events/FindEvents?page=1&AssetId=d21d73fb-bb69-11e8-8102-00155d040945
-
-
ChangedSince:
-
Data Type: datetime
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return events that have been modified or created since the datetime.
-
Example Usage
api/v1/core/events/FindEvents?page=1&ChangedSince=2016-03-10T14:23:00-08:00
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"Description": <string>,
"EventDate": <date>,
"EventTypeId": <GUID>,
"AssetId": <GUID>,
"SpaceId": <GUID>,
"LocationId": <GUID>,
"RecordedByPersonId": <GUID>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
},
...
]
}
}
Archive Event
URI
api/v1/core/events/ArchiveEvent
Supported Verbs
- POST: Archive an event.
Required Parameters
-
Archive Event Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Event Id to be archived.
-
Data Model
Archive Event Model
{
"Id": <Guid>
}
Archive Event Object Fields
-
Id
-
DataType: Guid
-
Required: true
-
Purpose: Archives the uniquely matching Event
-
Return Value
Action Accepted
{
"ActionType": "Archive",
"Id": <GUID>
}
-
ActionType: Will always be ‘Archive’.
-
Id: Guid for the Event.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message
Create/Update Trip Event
URI
api/v1/jobs/events/CreateOrUpdateTripEvent
Supported Verbs
- POST: insert or update a trip event.
Required Parameters
-
Trip Event Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Trip Event Model to be created.
-
Data Model
Trip Event Model
{
"Id": <Guid>,
"TripId": <GUID>,
"EventTypeId": <GUID>,
"Description": <string>,
"EventDate": <date>,
"LocationId": <GUID>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Trip Event Object Fields
-
Id
-
DataType: Guid
-
Required: false when creating new data; true when updating existing data
-
Purpose: Update the uniquely matching Trip Event
-
-
TripId
-
DataType: Guid for the Trip Event’s trip.
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Trip Event’s trip.
-
-
EventTypeId
-
DataType: Guid for the Trip Event’s type.
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Event type.
-
-
Description
-
DataType: string
-
Required: false
-
Purpose: Sets the description for the Trip Event.
-
-
EventDate
-
DataType: date
-
Required: false
-
Purpose: Sets the Trip Event’s date.
-
-
LocationId
-
DataType: Guid
-
Required: false
-
Purpose: Sets the Trip Event’s location.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Trip Event. Will be set to null if not specified.
-
Return Value
Action Accepted
{
"ActionType": <string>,
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>,
"Details": <string>
},
....
]
}
-
ActionType: ‘Insert’ or ‘Update’.
-
Id: Guid for the Trip Event.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
-
Details: Additional information about the error.
Action Rejected
"Data": <Array>
- Data: Error Message
Find Trip Events
URI
api/v1/jobs/events/FindTripEvents
Supported Verbs
- GET: return a filtered list of Trip Events. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/jobs/events/FindTripEvents?page=1
-
Optional Parameters
-
Id:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return the Trip Event with the given Id
-
Example Usage:
api/v1/jobs/events/FindTripEvents?page=1&Id=d21d73fb-bb69-11e8-8102-00155d040945
-
-
TripId:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Trip Events with the given TripId
-
Example Usage:
api/v1/jobs/events/FindTripEvents?page=1&TripId=d21d73fb-bb69-11e8-8102-00155d040945
-
-
ChangedSince:
-
Data Type: datetime
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Trip Events that have been modified or created since the datetime.
-
Example Usage
api/v1/jobs/events/FindTripEvents?page=1&ChangedSince=2016-03-10T14:23:00-08:00
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"TripId": <GUID>,
"EventTypeId": <GUID>,
"Description": <string>,
"EventDate": <date>,
"LocationId": <Guid>,
"UserDefined": UserDefinedDataModel (see User Defined Fields section for more details)
},
...
]
}
}
Create/Update Job Event
URI
api/v1/jobs/events/CreateOrUpdateJobEvent
Supported Verbs
- POST: insert or update a Job Event.
Required Parameters
-
Job Event Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Job Event Model to be created.
-
Data Model
Job Event Model
{
"Id": <Guid>,
"JobId": <GUID>,
"EventTypeId": <GUID>,
"Description": <string>,
"PlannedEventDate": <date>,
"EventDate": <date>,
"LocationId": <GUID>,
"RecordedByPersonId": <GUID>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Job Event Object Fields
-
Id
-
DataType: Guid
-
Required: false when creating new data; true when updating existing data
-
Purpose: Update the uniquely matching Job Event
-
-
JobId
-
DataType: Guid for the Job Events’s job.
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Job Event’s job. Not supported for update.
-
-
EventTypeId
-
DataType: Guid for the Job Event’s type.
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Event type.
-
-
Description
-
DataType: string [max. 1000 char]
-
Required: false
-
Purpose: Sets the description for the Job Event.
-
-
PlannedEventDate
-
DataType: date
-
Required: false
-
Purpose: Sets the Job Event’s planned date. Only one of PlannedEventDate and EventDate may be set.
-
-
EventDate
-
DataType: date
-
Required: false
-
Purpose: Sets the Job Event’s date. Only one of PlannedEventDate and EventDate may be set.
-
-
LocationId
-
DataType: Guid for the Location
-
Required: false
-
Purpose: Sets the Job Event’s location.
-
-
RecordedByPersonId
-
DataType: Guid for the Recorded By Person
-
Required: false
-
Purpose: Sets the Job Event’s Recorded By Person.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Job Event. Will be set to null if not specified.
-
Return Value
Action Accepted
{
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>,
"Details": <string>
},
....
]
}
-
Id: Guid for the Job Event.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
-
Details: Additional information about the error.
Action Rejected
"Data": <Array>
- Data: Error Message
Find Job Events
URI
api/v1/jobs/events/FindJobEvents
Supported Verbs
- GET: return a filtered list of Job Events. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/jobs/events/FindJobEvents?page=1
-
Optional Parameters
-
Id:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return the Job Event with the given Id
-
Example Usage:
api/v1/jobs/events/FindJobEvents?page=1&Id=d21d73fb-bb69-11e8-8102-00155d040945
-
-
JobId:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Job Events with the given JobId
-
Example Usage:
api/v1/jobs/events/FindJobEvents?page=1&JobId=d21d73fb-bb69-11e8-8102-00155d040945
-
-
ChangedSince:
-
Data Type: datetime
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return job events that have been modified or created since the datetime.
-
Example Usage
api/v1/jobs/events/FindJobEvents?page=1&ChangedSince=2016-03-10T14:23:00-08:00
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"JobId": <GUID>,
"EventTypeId": <GUID>,
"Description": <string>,
"PlannedEventDate": <date>,
"EventDate": <date>,
"LocationId": <GUID>,
"RecordedByPersonId": <GUID>,
"UserDefined": UserDefinedDataModel (see User Defined Fields section for more details)
},
...
]
}
}
Event Type
URI
api/v2/public/EventTypes
Supported Verbs
GET
- Find Event Types.
Data Models
Event Type Model
{
"Id": <GUID>,
"Name": <string>,
"Spaces": <Array>
[
{
"Id": <GUID>,
"Name": <string>,
},
...
],
"Tags": <Array>
[
{
"Id": <GUID>,
"Name": <string>,
},
...
]
}
Event Type Fields
-
Id
-
DataType: Guid
-
Purpose: To uniquely identify an event type.
-
-
Name
-
DataType: string [max. 200 char]
-
Filterable: true
-
Purpose: Specifies the name of an event type.
-
-
Spaces
-
DataType: Array
-
Purpose: Defines the spaces this event type is visible in.
-
Fields:
- Id
<GUID>
- Name
<string>
- Id
-
-
Tags
-
DataType: Array
-
Purpose: Defines the tags this event type has.
-
Fields:
- Id
<GUID>
- Name
<string>
- Id
-
Error Model
{
"ErrorCode": <integer>,
"ErrorMessage": <string>
}
Error Model Fields
-
ErrorCode
-
DataType: integer
-
Purpose: An integer that uniquely identifies this type of error.
-
-
ErrorMessage
-
DataType: string
-
Purpose: A message which describes what the error means.
-
Find Event Types
URI
GET api/v2/public/EventTypes
or
GET api/v2/public/EventTypes/{Id}
Example Usage
// Get a paginated response of all event types
GET api/v2/public/EventTypes
// Get a specific event type by Id
GET api/v2/public/EventTypes/d21d73fb-bb69-11e8-8102-00155d040945
Required Parameters
- None
Optional Parameters
-
page
:-
Data Type: integer
-
Parameter Type: query string
-
Default Value: 1
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
GET api/v2/public/EventTypes?page=2
-
-
$filter
:-
Data Type: string
-
Parameter Type: query string
-
Default Value: empty
-
Purpose: Controls filtering the returned data. See fields that have “Filterable: true”.
-
Example Usage:
// Get Event Types with Name equal to "Drill" GET api/v2/public/EventTypes?$filter=Name eq 'Drill'
-
Return Value
Action Accepted
Returns an array containing the requested Event Types in the format of the Event Types Model.
{
"Page": <integer>,
"Next": <URI>,
"Results": <Array of Event Type Model>
}
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Required Permissions
- Setup > Events > Event Types
Emergency Contacts
URI
api/v2/public/EmergencyContacts
Supported Verbs
-
GET
- Find emergency contacts
-
POST
- Create new emergency contacts
-
PATCH
- Update existing emergency contacts
-
DELETE
- Remove existing emergency contacts
Data Models
Emergency Contact Model
{
"Id": <GUID>,
"PersonId": <GUID>,
"Name": <string>,
"PhoneNumber": <string>,
"AlternatePhoneNumber": <string>,
"EmailAddresses": <string>,
"Relationship": <string>,
"Address": <string>,
"City": <string>,
"Country": <string>,
"StateOrProvince": <string>,
"PostalZipCode": <string>,
"SortOrder": <integer>,
"UserDefinedFields": User Defined Data Model (see User Defined Fields section for more details)
}
Emergency Contact Fields
-
Id
-
Data Type: Guid
-
Required: False when using
POST
to create. True when usingPATCH
to update orDELETE
to delete (unless Id is already specified in the URI). -
Purpose: To uniquely identify an Emergency Contact and to specify which Emergency Contact to apply an operation to.
-
-
PersonId
-
Data Type: Guid
-
Required: True when using
POST
to create; otherwise, False. -
Filterable: True
-
Purpose: Specifies the person this emergency contact is for. Cannot be
PATCH
ed.
-
-
Name
-
Data Type: string [max. 300 char]
-
Required: True when using
POST
to create; otherwise, False. -
Filterable: True
-
Purpose: Specifies the name of the emergency contact.
-
-
PhoneNumber
-
Data Type: string [max. 50 char]
-
Required: True when using
POST
to create; otherwise, False. -
Filterable: True
-
Purpose: Specifies the primary phone number of the emergency contact.
-
-
AlternatePhoneNumber
-
Data Type: string [max. 50 char]
-
Required: False
-
Filterable: True
-
Purpose: Specifies an alternative phone number of the emergency contact.
-
-
EmailAddresses
-
Data Type: string [max. 1000 char]
-
Required: False
-
Filterable: True
-
Purpose: Specifies a comma-separated list of email addresses of the emergency contact. The maximum length includes comma characters.
-
-
Relationship
-
Data Type: string [max. 200 char]
-
Required: False
-
Filterable: True
-
Purpose: Specifies the relationship of the emergency contact to the person. Eg: Wife, girlfriend, husband, mother, etc.
-
-
Address
-
Data Type: string [max. 1000 char]
-
Required: False
-
Filterable: True
-
Purpose: Specifies the address line of the emergency contact. Eg: 1600 Pennsylvania Avenue NW.
-
-
City
-
Data Type: string [max. 200 char]
-
Required: False
-
Filterable: True
-
Purpose: Specifies the city the emergency contact lives in.
-
-
Country
-
Data Type: string [max. 200 char]
-
Required: False
-
Filterable: True
-
Purpose: Specifies the country the emergency contact lives in.
-
-
StateOrProvince
-
Data Type: string [max. 200 char]
-
Required: False
-
Filterable: True
-
Purpose: Specifies the state or province the emergency contact lives in.
-
-
PostalZipCode
-
Data Type: string [max. 20 char]
-
Required: False
-
Filterable: True
-
Purpose: Specifies the postal or zip code of the emergency contact.
-
-
SortOrder
-
Data Type: integer [min: 0]
-
Required: False
-
Filterable: True
-
Purpose: Specifies the order of the emergency contact in the list of contacts for the person. If there is a collision between two contact’s
SortOrder
, then the updated one is used. If both are updated, they are processed in the order sent in the request body. The contact is appended if theSortOrder
is too large. -
Default Value: 0
-
-
UserDefinedFields
-
Data Type: User Defined Data Model (see User Defined Fields section for more details)
-
Required: False
-
Purpose: Specifies the User Defined Fields of the emergency contact.
-
Default Value: null
-
Error Model
{
"ErrorCode": <integer>,
"ErrorMessage": <string>
}
Error Model Fields
-
ErrorCode
-
Data Type: integer
-
Purpose: A unique identifier for this type of error.
-
-
ErrorMessage
-
Data Type: string
-
Purpose: A message which describes what the error means.
-
Find Emergency Contacts
URIs
GET api/v2/public/EmergencyContacts
or
GET api/v2/public/EmergencyContacts/{Id}
Example Usage
// Gets a paged result of emergency contacts
GET api/v2/public/EmergencyContacts
// Gets a single emergency contact
GET api/v2/public/EmergencyContacts/c5e69784-24c5-11e7-82c5-f01faf32a6aa
Required Parameters
- None
Optional Parameters
-
page
:-
Data Type: integer
-
Parameter Type: query string
-
Default Value: 1
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
GET api/v2/public/EmergencyContacts?page=2
-
-
$filter
:-
Data Type: string
-
Parameter Type: query string
-
Default Value: empty
-
Purpose: Controls filtering the returned data. See fields that have “Filterable: true”.
-
Example Usage:
// Get the emergency contacts who are wives GET api/v2/public/EmergencyContacts?$filter=Relationship eq 'Wife' // Get the emergency contacts who reside in the USA GET api/v2/public/EmergencyContacts?$filter=Country eq 'USA' // Get the first emergency contacts of everyone GET api/v2/public/EmergencyContacts?$filter=SortOrder eq 0
-
Required Permissions
One or both of the following:
- Management > People > People > Emergency Contacts > Read
- Management > People > People > Emergency Contacts > Edit
Return Value
Action Accepted
Returns an array containing the requested Emergency Contacts in the format of the Emergency Conact Model.
{
"Page": <integer>,
"Next": <URI>,
"Results": <Array of Emergency Contact Model>
}
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Create Emergency Contact
URI
POST api/v2/public/EmergencyContacts
Example Usage
// Add a single emergency contact
POST api/v2/public/EmergencyContacts
{
"PersonId": "c5e69784-24c5-11e7-82c5-f01faf32a6aa",
"Name": "George Washington",
"PhoneNumber": "202-456-1111"
}
// Add multiple emergency contacts.
POST api/v2/public/EmergencyContacts
[
{
"PersonId": "c5e69784-24c5-11e7-82c5-f01faf32a6aa",
"Name": "Benjamin Franklin",
"PhoneNumber": "1-800-ASK-USPS"
},
{
"PersonId": "c5e69784-24c5-11e7-82c5-f01faf32a6aa",
"Name": "James Madison",
"PhoneNumber": "1-866-272-6272"
}
]
// The contacts current order would look like the following:
// - James Madison
// - Benjamin Franklin
// - George Washington
// Append an emergency contact
POST api/v2/public/EmergencyContacts
{
"PersonId": "c5e69784-24c5-11e7-82c5-f01faf32a6aa",
"Name": "Alexandar Hamilton",
"PhoneNumber": "(202) 622-2000",
"SortOrder": 100,
}
// Contacts:
// - James Madison
// - Benjamin Franklin
// - George Washington
// - Alexander Hamilton
// Insert an emergency contact
POST api/v2/public/EmergencyContacts
{
"PersonId": "c5e69784-24c5-11e7-82c5-f01faf32a6aa",
"Name": "Thomas Jefferson",
"PhoneNumber": "1-866-272-6272",
"SortOrder": 2,
}
// Contacts:
// - James Madison
// - Benjamin Franklin
// - Thomas Jefferson
// - George Washington
// - Alexander Hamilton
Required Parameters
-
Data Type: Emergency Contact Model or Array of Emergency Contact Model
-
Parameters Type: request body
-
Purpose: Supplies the Emergency Contact(s) to be created.
Required Permissions
- Management > People > People > Emergency Contacts > Edit
Return Value
Action Accepted
Returns a single Emergency Contact Model or an array of Emergency Contact Model.
<Emergency Contact Model> | <Array of Emergency Contact Model>
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Update Emergency Contact
URI
PATCH api/v2/public/EmergencyContacts
or
PATCH api/v2/public/EmergencyContacts/{Id}
Example Usage
// Contacts:
// - James Madison
// - Benjamin Franklin
// - George Washington (Id: 7694520e-b2de-4dbe-9d6d-fbf8addd8a28)
// - Alexander Hamilton
// Update George to be the first contact
PATCH api/v2/public/EmergencyContacts/7694520e-b2de-4dbe-9d6d-fbf8addd8a28
{
"SortOrder": 0
}
// Contacts:
// - George Washington (Id: 7694520e-b2de-4dbe-9d6d-fbf8addd8a28)
// - James Madison
// - Benjamin Franklin
// - Alexander Hamilton
// Update an Emergency Contact's City
PATCH api/v2/public/EmergencyContacts
{
"Id": "7694520e-b2de-4dbe-9d6d-fbf8addd8a28",
"City": "Mount Vernon"
}
// or
PATCH api/v2/public/EmergencyContacts/7694520e-b2de-4dbe-9d6d-fbf8addd8a28
{
"City": "Mount Vernon"
}
Required Parameters
-
Id
-
Data Type: Guid
-
Parameters Type: request path or request body
-
Purpose: To specify which Emergency Contact to apply an operation to.
-
Required Permissions
- Management > People > People > Emergency Contacts > Edit
Return Value
Action Accepted
Returns a single or an array of all modified Emergency Contacts. If there were two emergency contacts and the second one was updated to be the first, both contacts would be returned.
<Emergency Contact Model> | <Array of Emergency Contact Model>
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Delete Emergency Contact
URI
DELETE api/v2/public/EmergencyContacts/{Id}
Example Usage
// Contacts:
// - James Madison
// - Benjamin Franklin
// - George Washington (Id: 7694520e-b2de-4dbe-9d6d-fbf8addd8a28)
// - Alexander Hamilton
// Remove George as a contact
DELETE api/v2/public/EmergencyContacts/7694520e-b2de-4dbe-9d6d-fbf8addd8a28
// Contacts:
// - James Madison
// - Benjamin Franklin
// - Alexander Hamilton
Required Parameters
-
Id
-
Data Type: Guid
-
Parameters Type: request path
-
Purpose: To specify which Emergency Contact to delete.
-
Required Permissions
- Management > People > People > Emergency Contacts > Edit
Return Value
Action Accepted
Returns nothing.
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Job
Create Job
URI
api/v1/jobs/jobs/CreateJob
Supported Verbs
- POST: insert a Job.
Required Parameters
-
Job Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies the Job information to be created.
-
Optional Parameters
-
asRequest
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, instead of creating a Job directly, a Request for those changes will be created.
-
Example Usage:
api/v1/jobs/jobs/CreateJob?asRequest=true
-
Data Model
Job Model
{
"Trip": {
"Id": <GUID>,
"TripNumber": <string>
},
"RequiredResourceType":
{
"Id": <GUID>,
"Name": <string>
},
"Resource": {
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Acknowledged": <boolean>,
"RunningTo": <decimal>,
"StartDate": <date>,
"EndDate": <date>,
"PlannedStartDate": <date>,
"PlannedEndDate": <date>,
"RunningFrom": <decimal>,
"CancelledDate": <date>,
"IsNoCharge": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Job Object Fields
-
Trip
-
DataType: JSON Object
-
Required: true
-
Purpose: Identify which Trip to add the Job to.
-
Fields:
-
Id
<GUID>
-
TripNumber
<string>
-
-
-
RequiredResourceType
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the RequiredResourceTypeId of the Job.
-
Function: Selects the RequiredResourceType that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
-
-
Resource
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the ResourceId of the Job.
-
Function: Selects the ResourceId of the resource that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
ExternalSystemCode
<string>
-
-
-
Acknowledged
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the Acknowledged value of the Job.
-
-
RunningTo
-
DataType: decimal
-
Required: false
-
Purpose: Sets the RunningTo time of the of the Job (in minutes).
-
-
StartDate
-
DataType: date
-
Required: false
-
Purpose: Sets the StartDate of the Job.
-
-
EndDate
-
DataType: date
-
Required: false
-
Purpose: Sets the EndDate of the Job.
-
-
PlannedStartDate
-
DataType: date
-
Required: false
-
Purpose: Sets the PlannedStartDate of the Job.
-
-
PlannedEndDate
-
DataType: date
-
Required: false
-
Purpose: Sets the PlannedEndDate of the Job.
-
-
RunningFrom
-
DataType: decimal
-
Required: false
-
Purpose: Sets the RunningFrom time of the of the Job (in minutes).
-
-
CancelledDate
-
DataType: date
-
Required: false
-
Default Value: false
-
Purpose: Sets the CancelledDate of the Job.
-
-
IsNoCharge
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the IsNoCharge status of the Job.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Job.
-
Return Value
With no results
{
"Data":
{
"LogMessages": <Array>
[
{
"Message": <string>,
"Entity": <string>,
"Details": <string>
},
....
]
}
}
With results
{
"Data":
{
"JobId": <GUID>,
"LogMessages": <Array>
[
{
"Message": <string>,
"Entity": <string>,
"Details": <string>
},
....
]
}
}
Update Job
URI
api/v1/jobs/jobs/UpdateJob
Supported Verbs
- POST: update specified Job. Only Non-Invoiced jobs can be updated.
Required Parameters
-
Job Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies Job Model to be updated.
-
Optional Parameters
-
asRequest
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, instead of updating a Job directly, a Request for those changes will be created.
-
Example Usage:
api/v1/jobs/jobs/UpdateJob?asRequest=true
-
Data Model
Job Model
{
"Id": <GUID>,
"RequiredResourceType":
{
"Id": <GUID>,
"Name": <string>
},
"Resource": {
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Acknowledged": <boolean>,
"RunningTo": <decimal>,
"StartDate": <date>,
"EndDate": <date>,
"PlannedStartDate": <date>,
"PlannedEndDate": <date>,
"RunningFrom": <decimal>,
"CancelledDate": <date>,
"IsNoCharge": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Job Object Fields
-
Id
-
DataType: GUID
-
Required: true
-
Purpose: If not NULL, the specified job will be updated
-
-
RequiredResourceType
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the RequiredResourceTypeId of the Job.
-
Function: Selects the RequiredResourceType that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
-
-
Resource
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the ResourceId of the Job.
-
Function: Selects the ResourceId of the resource that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
ExternalSystemCode
<string>
-
-
-
Acknowledged
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the Acknowledged value of the Job.
-
-
RunningTo
-
DataType: decimal
-
Required: false
-
Purpose: Sets the RunningTo time of the of the Job (in minutes).
-
-
StartDate
-
DataType: date
-
Required: false
-
Purpose: Sets the StartDate of the Job.
-
-
EndDate
-
DataType: date
-
Required: false
-
Purpose: Sets the EndDate of the Job.
-
-
PlannedStartDate
-
DataType: date
-
Required: false
-
Purpose: Sets the PlannedStartDate of the Job.
-
-
PlannedEndDate
-
DataType: date
-
Required: false
-
Purpose: Sets the PlannedEndDate of the Job.
-
-
RunningFrom
-
DataType: decimal
-
Required: false
-
Purpose: Sets the RunningFrom time of the of the Job (in minutes).
-
-
CancelledDate
-
DataType: date
-
Required: false
-
Default Value: false
-
Purpose: Sets the CancelledDate of the Job.
-
-
IsNoCharge
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the IsNoCharge status of the Job.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Job.
-
Return Value
With no results
{
"Data":
{
"LogMessages": <Array>
[
{
"Message": <string>,
"Entity": <string>,
"Details": <string>
},
....
]
}
}
With results
{
"Data":
{
"JobId": <GUID>,
"LogMessages": <Array>
[
{
"Message": <string>,
"Entity": <string>,
"Details": <string>
},
....
]
}
}
Find Jobs
URI
api/v1/jobs/jobs/FindJobs
Supported Verbs
- GET: return a filtered list of Jobs. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/jobs/jobs/FindJobs?page=2
-
Optional Parameters
-
JobNumber:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Jobs that have this JobNumber.
-
Example Usage:
api/v1/jobs/jobs/FindJobs?page=1&JobNumber=12.3.4
-
-
JobId:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Jobs that have this JobId.
-
Example Usage:
api/v1/jobs/jobs/FindJobs?page=1&JobId=c5e69784-24c5-11e7-82c5-f01faf32a6aa
-
-
TripNumber:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Jobs that have this TripNumber.
-
Example Usage:
api/v1/jobs/jobs/FindJobs?page=1&TripNumber=12.3
-
-
TripId:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Jobs that have this TripId.
-
Example Usage:
api/v1/jobs/jobs/FindJobs?page=1&TripId=c5e69784-24c5-11e7-82c5-f01faf32a6aa
-
-
OrderNumber:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Jobs that have this OrderNumber.
-
Example Usage:
api/v1/jobs/jobs/FindJobs?page=1&OrderNumber=12
-
-
OrderId:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Jobs that have this OrderId.
-
Example Usage:
api/v1/jobs/jobs/FindJobs?page=1&OrderId=c5e69784-24c5-11e7-82c5-f01faf32a6aa
-
-
FromDate:
-
Data Type: date
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Jobs where the EndDate is >= FromDate
-
Example Usage:
api/v1/jobs/jobs/FindJobs?page=1&FromDate=2016-03-10T14:23:00-08:00
-
-
ToDate:
-
Data Type: date
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return jobs where the StartDate is <= ToDate.
-
Example Usage
api/v1/jobs/jobs/FindJobs?page=1&ToDate=2016-03-10T14:23:00-08:00
-
-
ChangedSince:
-
Data Type: date
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Jobs that have been created or modified since the date.
-
Example Usage
api/v1/jobs/jobs/FindJobs?page=1&ChangedSince=2016-03-10T14:23:00-08:00
-
-
includeRequests:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, requested Jobs will also be returned
-
Example Usage
api/v1/jobs/jobs/FindJobs?page=1&includeRequests=true
-
-
excludeNonRequests:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, only requested Jobs will be returned
-
Example Usage
api/v1/jobs/jobs/FindJobs?page=1&includeRequests=true&excludeNonRequests=true
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"TripId": <GUID>,
"JobNumber": <string>,
"RequiredResourceType":
{
"Id": <GUID>,
"Name": <string>
},
"Resource": {
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Acknowledged": <boolean>,
"RunningTo": <decimal>,
"RunningFrom": <decimal>,
"StartDate": <date>,
"EndDate": <date>,
"PlannedStartDate": <date>,
"PlannedEndDate": <date>,
"CancelledDate": <date>,
"IsNoCharge": <boolean>,
"IsRequest": <boolean>
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
},
....
]
}
Delete Job
URI
api/v1/jobs/jobs/DeleteJob
Supported Verbs
- POST: Delete a Job.
Required Parameters
-
Delete Job Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Job Id to be deleted.
-
Data Model
Delete Job Model
{
"Id": <Guid>
}
Delete Job Object Fields
-
Id
-
DataType: Guid
-
Required: true
-
Purpose: Deletes the uniquely matching Job
-
Return Value
Action Accepted
{
"ActionType": "Delete",
"Id": <GUID>
}
-
ActionType: Will always be ‘Delete’.
-
Id: Guid for the Job.
Action Rejected
"Data": <Array>
- Data: Error Message
Acknowledge Job
URI
api/v1/jobs/jobs/AcknowledgeJob
Supported Verbs
- POST: Set specified Job with assigned Resource to Acknowledged.
Required Parameters
-
JobId
-
Data Type: Guid
-
Parameter Type: query string
-
Purpose: The JobId of the Job to be acknowledged.
-
Example Usage:
api/v1/jobs/jobs/AcknowledgeJob?JobId=c5e69784-24c5-11e7-82c5-f01faf32a6aa
-
Optional Parameters
- None
Return Value
Action Accepted
{
"Data": null
}
Action Rejected
{
"Message": <string>
}
- Message: Error Messages
Location
URI
api/v2/public/Locations
Supported Verbs
-
GET
- Find Locations.
-
POST
- Create new Locations.
- Add Divisions to existing Locations.
-
PATCH
- Update existing Locations.
-
DELETE
- Remove Divisions from existing Locations.
Data Models
Location Model
{
"Id": <GUID>,
"Name": <string>,
"ShortName": <string>,
"RunningTime": <integer>,
"IsRequested": <boolean>,
"ExternalSystemCode": <string>,
"IsArea": <boolean>,
"Latitude": <decimal>,
"Longitude": <decimal>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"Parent": {
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"LocationType": {
"Id": <GUID>,
"Name": <string>
},
"Divisions": <Array>
[
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
...
]
}
Location Fields
-
Id
-
DataType: Guid
-
Required: False when using POST to create, True when using PATCH to update (unless Id is already specified in the URI).
-
Purpose: To uniquely identify a Location and to specify which Location to apply an operation to.
-
-
Name
-
DataType: string [max. 400 char]
-
Required: True when using POST to create, False when using PATCH to update.
-
Filterable: True
-
Purpose: Specifies the name of a Location.
-
-
ShortName
-
DataType: string [max. 100 char]
-
Required: False
-
Filterable: True
-
Purpose: Specifies a shortened name for a Location.
-
-
RunningTime
-
DataType: integer
-
Required: False
-
Purpose: Specifies the Running Time in minutes. For example, a running time of 2 hours would be represented by a value of
120
(representing 120 minutes).
-
-
IsRequested
-
DataType: boolean
-
Required: False
-
Filterable: True
-
Purpose: If true on POST, specifies that this Location be created as a request. It is invalid to set this field on a PATCH.
-
-
ExternalSystemCode
-
DataType: string [max. 200 char]
-
Required: False
-
Filterable: True
-
-
IsArea
-
DataType: boolean
-
Required: False. Providing it for any request is an error.
-
Filterable: True
-
Purpose: True if this Location is also an Area. Being an Area means a Location has one or more Divisions. If a Location has no Divisions then this is false. This field is read-only and it is an error to attempt to set it to any value; set Divisions instead.
-
-
Latitude
-
DataType: decimal
-
Required: False
-
Purpose: Specifies the latitude of the location in degrees. Must be between -90 and 90.
-
-
Longitude
-
DataType: decimal
-
Required: False
-
Purpose: Specifies the longitude of the location in degrees. Must be between -180 and 180.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Location. Will be set to null if not specified.
-
-
Parent
-
DataType: object
-
Required: false
-
Purpose: Defines a Parent for this Location, so that it is possible to construct a tree of Locations. Either Name or Id can be set to identify another Location. If both are set, they must point to the same Location. If there are multiple Locations with the same Name then Id must be used. If Name is used, supports referring to other Locations in the same request; for example, if multiple Locations are POST in an array at the same time, Name can be used to refer to the name of other Locations in the same request, allowing a tree of Locations to be built using one request.
-
Fields:
- Id
<GUID>
: optional - Name
<string>
: optional - ExternalSystemCode
<string>
: read-only
- Id
-
-
LocationType
-
DataType: object
-
Required: false
-
Purpose: Defines a Location Type for this Location. Either Name or Id can be set to identify a Location Type. If both are set, they must point to the same Location Type.
-
Fields:
- Id
<GUID>
: optional - Name
<string>
: optional
- Id
-
-
Divisions
-
DataType: Array
-
Required: false
-
Purpose: Defines the Divisions which are attached to this Location. Divisions must not be redundant (for example, a division that is the root of the division tree can not be specified at the same time as a division that is a child of that division).
-
Fields:
- Id
<GUID>
: required for each Division - Name
<string>
: read-only - ExternalSystemCode
<string>
: read-only
- Id
-
Error Model
{
"ErrorCode": <integer>,
"ErrorMessage": <string>
}
Error Model Fields
-
ErrorCode
-
DataType: integer
-
Purpose: An integer that uniquely identifies this type of error.
-
-
ErrorMessage
-
DataType: string
-
Purpose: A message which describes what the error means.
-
Find Location
URI
GET api/v2/public/Locations
or
GET api/v2/public/Locations/{Id}
Example Usage
// Get a paginated response of all locations
GET api/v2/public/Locations
// Get a specific location by Id
GET api/v2/public/Locations/d21d73fb-bb69-11e8-8102-00155d040945
Required Parameters
- None
Optional Parameters
-
page
:-
Data Type: integer
-
Parameter Type: query string
-
Default Value: 1
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
GET api/v2/public/Locations?page=2
-
-
$filter
:-
Data Type: string
-
Parameter Type: query string
-
Default Value: empty
-
Purpose: Controls filtering the returned data. See fields that have “Filterable: true”.
-
Example Usage:
// Get Locations with Name equal to "Canada" GET api/v2/public/Locations?$filter=Name eq 'Canada' // Get Locations with ShortName equal to "CA" GET api/v2/public/Locations?$filter=ShortName eq 'CA' // Get Locations with IsRequested = true GET api/v2/public/Locations?$filter=IsRequested eq true
-
Required Permissions
One or both of the following:
- Setup > Locations > Locations > Read
- Setup > Locations > Locations > Edit
Return Value
Action Accepted
Returns an array containing the requested Locations in the format of the Location Model.
{
"Page": <integer>,
"Next": <URI>,
"Results": <Array of Location Model>
}
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Create Location
URI
POST api/v2/public/Locations
Example Usage
// Create one Location
POST api/v2/public/Locations
{ "Name": "Canada" }
// Create a Location tree
POST api/v2/public/Locations
[
{
"Name": "Canada"
},
{
"Name": "British Columbia",
"Parent": {
Name: "Canada"
}
}
]
Required Parameters
-
Data Type: Location Model or Array of Location Model
-
Parameter Type: request body
-
Purpose: Supplies the Location(s) to be created.
Required Permissions
- Setup > Locations > Locations > Edit
Return Value
Action Accepted
Returns an array containing the created Locations.
<Array of Location Model>
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Update Location
URIs
Update a Location
PATCH api/v2/public/Locations/
or
PATCH api/v2/public/Locations/{Id}
Add a Division to a Location
POST api/v2/public/Locations/{Id}/divisions
Remove a Division from a Location
DELETE api/v2/public/Locations/{Id}/divisions/{DivisionId}
Required Parameters
-
Id
:-
Data Type: Guid
-
Parameter Type: request path or request body
-
Purpose: To specify which Location to apply an operation to.
-
Example Usage:
// Update a Location Name by providing the Id in the request path PATCH api/v2/public/Locations/c5e69784-24c5-11e7-82c5-f01faf32a6aa { "Name": "Canada" } // Update the Name of multiple Locations by providing the Id in the request body PATCH api/v2/public/Locations [ { "Id": "c5e69784-24c5-11e7-82c5-f01faf32a6aa", "Name": "Canada" }, { "Id": "d21d73fb-bb69-11e8-8102-00155d040945", "Name": "Victoria" } ] // Add a Division to an existing Location POST api/v2/public/Locations/c5e69784-24c5-11e7-82c5-f01faf32a6aa/divisions { "Id": "c5e69784-24c5-11e7-82c5-f01faf32a6aa" }
-
Optional Parameters
-
DivisionId
:-
Data Type: Guid
-
Parameter Type: request path
-
Purpose: To specify which Location Division to apply an operation to.
-
Example Usage:
// To remove a Division (with Id of 7694520e-b2de-4dbe-9d6d-fbf8addd8a28) from a Location DELETE api/v2/public/Locations/c5e69784-24c5-11e7-82c5-f01faf32a6aa/divisions/7694520e-b2de-4dbe-9d6d-fbf8addd8a28
-
Required Permissions
- Setup > Locations > Locations > Edit
Return Value
Action Accepted
Returns an array containing the modified Locations.
<Array of Location Model>
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Order
Create Order
URI
api/v1/jobs/orders/CreateOrder
Supported Verbs
- POST: insert an Order and any associated Trips and Jobs.
Required Parameters
-
OrderModel
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies the Order information and Trip(s)/Job(s) information to be created.
-
Optional Parameters
-
addNewShip
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true and if Ship can’t be found, it will create new Ship based on the information provided.
-
Note: Name is required to add the new Ship
-
Example Usage:
api/v1/Jobs/Orders/CreateOrder?addNewShip=true
-
-
asRequest
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, instead of creating an Order directly, a Request for those changes will be created. Any Trip, Job or Ship that is created as a result will also be created as requests.
-
Example Usage:
api/v1/Jobs/Orders/CreateOrder?asRequest=true
-
Data Model
Order Model
{
"Division":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Area":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Ship":
{
"Id": <GUID>,
"ShipTypeId": <GUID>,
"Name": <string>,
"IMONumber": <string>,
"MMSI": <string>,
"Nation": <string>,
"CallSign": <string>,
"Height": <decimal>,
"Deadweight": <decimal>,
"GT": <decimal>,
"LOA": <decimal>,
"Beam": <decimal>,
"TEU": <decimal>,
"NT": <decimal>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
},
"CustomerAccount":
{
"Id": <GUID>,
"Name": <string>,
"AccountNumber": <string>
},
"AgentAccount":
{
"Id": <GUID>,
"Name": <string>,
"AccountNumber": <string>
},
"AwardedToAccount":
{
"Id": <GUID>,
"Name": <string>,
"AccountNumber": <string>
},
"OrderDate": <date>,
"CustomerPONumber": <string>,
"VoyageNumber": <string>,
"IsBillable": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"Trips": <Array>
[
<TripModel>,
....
]
}
Trip Model
{
"TripType":
{
"Id": <GUID>,
"Name": <string>
},
"FromLocation":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"ToLocation":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Status": <string>,
"RequestedDate": <date>,
"StartDate": <date>,
"EndDate": <date>,
"IsRequestedDateFirm": <boolean>,
"EstimatedDuration": <decimal>,
"NumberRequiredResources": <integer>,
"CancelledDate": <datetime>,
"IsNoCharge": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"Jobs": <Array>
[
<JobModel>,
....
]
}
Job Model
{
"RequiredResourceType":
{
"Id": <GUID>,
"Name": <string>
},
"Resource": {
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Acknowledged": <boolean>,
"RunningTo": <decimal>,
"StartDate": <date>,
"EndDate": <date>,
"PlannedStartDate": <date>,
"PlannedEndDate": <date>,
"RunningFrom": <decimal>,
"CancelledDate": <date>,
"IsNoCharge": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Order Object Fields
-
Division
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the DivisionId of the Order.
-
Function: Selects the Division that uniquely matches one or more of the given fields.
-
Note: If a DivisionId is found, it will filter the data by division for the CustomerAccount, AgentAccount, and AwardedToAccount fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
ExternalSystemCode
<string>
-
-
-
Ship
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the ShipId of the OrderShip of the Order.
-
Function: Selects the Ship that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
ShipTypeId
<GUID>
-
Name
<string>
-
IMONumber
<string>
-
MMSI
<string>
-
Nation
<string>
-
CallSign
<string>
-
Height
<decimal>
-
Deadweight
<decimal>
-
GT
<decimal>
-
LOA
<decimal>
-
Beam
<decimal>
-
TEU
<decimal>
-
NT
<decimal>
-
UserDefined
<JSON>
-
-
Note: The endpoint uses Id, Name, IMONumber, MMSI, CallSign to find ShipId. If no matching ship is found and
?addNewShip=true
is specified, it will create a new Ship with all other properties provided.
-
-
CustomerAccount
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the CustomerAccountId of the Order.
-
Function: Selects the CustomerAccount that uniquely matches one or more of the given fields.
-
Note: Can be filtered by Division. Only matches accounts that have an AccountType that has
IsCustomer = true
. -
Fields:
-
Id
<GUID>
-
Name
<string>
-
AccountNumber
<string>
-
-
-
AgentAccount
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the AgentAccountId of the Order.
-
Function: Selects the AgentAccount that uniquely matches one or more of the given fields.
-
Note: Can be filtered by Division. Only matches accounts that have an AccountType that has
IsAgent = true.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
AccountNumber
<string>
-
-
-
Area
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the Area of the Order.
-
Function: Selects the Area that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
ExternalSystemCode
<string>
-
-
-
AwardedToAccount
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the AwardedToAccountId of the Order.
-
Function: Selects the AwardedToAccount that uniquely matches one or more of the given fields.
-
Note: Can be filtered by Division. Only matches accounts that have an AccountType that has
IsCompetitor = true
or is an Account that is part of a Company that hasIsMyCompany = true
. -
Fields:
-
Id
<GUID>
-
Name
<string>
-
AccountNumber
<string>
-
-
-
OrderDate
-
DataType: date
-
Required: false
-
Purpose: Sets the OrderDate of the Order.
-
-
VoyageNumber
-
DataType: string
-
Required: false
-
Purpose: Sets the VoyageNumber of the Order.
-
-
CustomerPONumber
-
DataType: string
-
Required: false
-
Purpose: Sets the CustomerPONumber of the Order.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Order.
-
-
IsBillable
-
DataType: boolean
-
Required: false
-
Default: true when creating an Order. No change when updating an Order.
-
Purpose: Sets whether the Order is billable or not
-
-
Trips
-
DataType: Array of JSON Trip Objects (see below)
-
Required: true
-
Purpose: Sets the Trips for the Order.
-
Note: Creating an Order must have at least one Trip attached.
-
Trip Object Fields
-
TripType
-
DataType: JSON Object
-
Required: true
-
Purpose: Sets the TripTypeId of the Trip.
-
Function: Selects the TripType that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
-
-
FromLocation
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the FromLocationId of the Trip.
-
Function: Selects the FromLocation that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<String>
-
ExternalSystemCode
<string>
-
-
-
ToLocation
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the ToLocationId of the Trip.
-
Function: Selects the ToLocation that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<String>
-
ExternalSystemCode
<string>
-
-
-
Status
-
DataType: string
-
Required: false
-
Purpose: Sets the Status of the Trip.
-
Note: Status can be one of the following values and is case sensitive:
-
Null: will mark this Trip as unconfirmed
-
**"**STATUS_COMPLETE": will mark this Trip as complete
-
“STATUS_CONFIRMED”: will mark this Trip as confirmed
-
“STATUS_CANCELLED”: will mark this Trip as cancelled
-
-
-
RequestedDate
-
DataType: date
-
Required: false
-
Purpose: Sets the RequestedDate of the Trip.
-
-
IsRequestedDateFirm
-
DataType: boolean
-
Required: false
-
Purpose: Sets the IsRequestedDateFirm of the Trip.
-
-
EstimatedDuration
-
DataType: decimal
-
Required: false
-
Purpose: Sets the Duration of the Trip.
-
Note: This value is stored in minutes.
-
-
StartDate
-
DataType: date
-
Required: false
-
Purpose: Sets the StartDate of the Trip.
-
-
EndDate
-
DataType: date
-
Required: false
-
Purpose: Sets the EndDate of the Trip.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Trip.
-
-
NumberRequiredResources
-
DataType: Integer
-
Required: false
-
Purpose: Create specified number of Jobs if the Jobs field (see below) is not specified
-
Note: Jobs will have default resource type if client only has one root resource type. Jobs’ startDate and endDate will default to Trip’s startDate and EndDate. Job’s RunningFrom and RunningTo will be defaulted based on the From and To Location.
-
-
CancelledDate
-
DataType: datetime
-
Required: false
-
Purpose: Sets the CancelledDate of the Trip.
-
Note: CancelledDate can only be set on a trip with a status of “STATUS_CANCELLED”.
-
-
IsNoCharge
-
DataType: boolean
-
Required: false
-
Purpose: Sets the IsNoCharge status of the Trip.
-
-
Jobs
-
DataType: an Array of JSON Objects
-
Required: false
-
Purpose: Create Jobs on the Trip
-
Job Object Fields
-
RequiredResourceType
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the RequiredResourceTypeId of the Job.
-
Function: Selects the RequiredResourceType that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
-
-
Resource
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the ResourceId of the Job.
-
Function: Selects the ResourceId of the resource that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
ExternalSystemCode
<string>
-
-
-
Acknowledged
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the Acknowledged value of the Job.
-
-
RunningTo
-
DataType: decimal
-
Required: false
-
Purpose: Sets the RunningTo time of the of the Job (in minutes).
-
-
StartDate
-
DataType: date
-
Required: false
-
Purpose: Sets the StartDate of the Job.
-
-
EndDate
-
DataType: date
-
Required: false
-
Purpose: Sets the EndDate of the Job.
-
-
PlannedStartDate
-
DataType: date
-
Required: false
-
Purpose: Sets the PlannedStartDate of the Job.
-
-
PlannedEndDate
-
DataType: date
-
Required: false
-
Purpose: Sets the PlannedEndDate of the Job.
-
-
RunningFrom
-
DataType: decimal
-
Required: false
-
Purpose: Sets the RunningFrom time of the of the Job (in minutes).
-
-
CancelledDate
-
DataType: date
-
Required: false
-
Default Value: false
-
Purpose: Sets the CancelledDate of the Job.
-
-
IsNoCharge
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the IsNoCharge status of the Job.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Job.
-
Return Value
With no results
{
"Data":
{
"LogMessages": <Array>
[
{
"Message": <string>,
"Entity": <string>,
"Details": <string>
},
....
]
}
}
With results
{
"Data":
{
"OrderId": <GUID>,
"NewShipId": <GUID>,
"TripIds": <Array of GUID>,
"LogMessages": <Array>
[
{
"Message": <string>,
"Entity": <string>,
"Details": <string>
},
....
]
}
}
-
LogMessages: This will describe any failures that occurred when trying to find the matching entity. For Example, if you tried to post:
{ "Division": { "Name": "BadNameThatDoesNotExist" } }
then the Log Message would inform you that Division (the Entity) returned no results. If an entity is required, such as Trip Type, and no result was returned then the operation will not be completed.
Update Order
URI
api/v1/jobs/orders/UpdateOrder
Supported Verbs
- POST: update an Order and any associated Trips.
Note
- This endpoint functions almost exactly like Create Order. The only difference is that an Id must be supplied for the Order Data Model object. For Trips, an Id must be supplied for any Trip that is being updated. If a Trip has no Id, when using Update Order, it is assumed to be a new Trip for the Order, and will be inserted. Any Trips not included will be deleted. NumberRequiredResources and Jobs will be ignored if the Trip already exists in database.
Required Parameters
-
OrderModel
-
Data Type: JSON Object (See Data Model from Create Order for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies the Order information and Trip(s) information to be updated.
-
Optional Parameters
-
addNewShip
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true and if Ship can’t be found, it will create new Ship based on the information provided.
-
Note: Name is required to add the new Ship
-
Example Usage:
api/v1/Jobs/Orders/UpdateOrder?addNewShip=true
-
-
asRequest
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, instead of updating an Order directly, a Request for those changes will be created. Any Trip, Job or Ship that is created as a result will also be created as requests.
-
Example Usage:
api/v1/Jobs/Orders/UpdateOrder?asRequest=true
-
Data Model
-
Refer to Create Order, for full details. This outlines how the Id for Order and Trip must be used when using Update Order. Trips with no Id will be added to the Order.
{ "Id": <GUID>, .... "Trips": <Array> [ { "Id": <GUID>, .... }, { "TripType": { "Id": <GUID>, "Name": <string> }, "FromLocation": { "Id": <GUID>, "ExternalSystemCode": <string> }, "ToLocation": { "Id": <GUID>, "ExternalSystemCode": <string> }, "Status": <string>, "RequestedDate": <date>, "StartDate": <date>, "EndDate": <date>, "IsRequestedDateFirm": <boolean>, "EstimatedDuration": <decimal> "CancelledDate": <date>, "IsNoCharge": <boolean> }, .... ] }
In the above model, the Order is being updated (Id is supplied). The first Trip is being updated (Id is supplied). The second Trip (which has no Id given), is being inserted for this Order.
Return Value
- Same as Create Order.
Find Orders
URI
api/v1/jobs/orders/FindOrders
Supported Verbs
- GET: return a filtered list of Orders and Trips. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/Jobs/Orders/FindOrders?page=2
-
Optional Parameters
-
ShipName:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Orders that have a Ship with the given name.
-
Example Usage:
api/v1/Jobs/Orders/FindOrders?page=1&ShipName=Helm
-
-
ShipIMONumber:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Orders that have a Ship with the given IMO number.
-
Example Usage:
api/v1/Jobs/Orders/FindOrders?page=1&ShipIMONumber=12345
-
-
CustomerPONumber:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Orders that have this CustomerPONumber.
-
Example Usage:
api/v1/Jobs/Orders/FindOrders?page=1&CustomerPONumber=12345
-
-
VoyageNumber:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Orders that have this VoyageNumber.
-
Example Usage:
api/v1/Jobs/Orders/FindOrders?page=1&VoyageNumber=12345
-
-
OrderNumber:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Orders that have this OrderNumber.
-
Example Usage:
api/v1/Jobs/Orders/FindOrders?page=1&OrderNumber=12345
-
-
OrderId:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Orders that have this OrderId.
-
Example Usage:
api/v1/Jobs/Orders/FindOrders?page=1&OrderId=c5e69784-24c5-11e7-82c5-f01faf32a6aa
-
-
FromDate:
-
Data Type: date
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Orders that have Trip(s) where the latest Trip based on EndDate (or RequestedDate if EndDate is blank) is >= FromDate
-
Example Usage:
api/v1/Jobs/Orders/FindOrders?page=1&FromDate=2016-03-10T14:23:00-08:00
-
-
ToDate:
-
Data Type: date
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Orders that have Trip(s) where the earliest Trip based on StartDate (or RequestedDate if StartDate is blank) is <= ToDate.
-
Example Usage
api/v1/Jobs/Orders/FindOrders?page=1&ToDate=2016-03-10T14:23:00-08:00
-
-
ChangedSince:
-
Data Type: date
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Orders that have been created or modified since the date.
-
Example Usage
api/v1/Jobs/Orders/FindOrders?page=1&ChangedSince=2016-03-10T14:23:00-08:00
-
-
includeRequests:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, requested Orders will also be returned
-
Example Usage
api/v1/Jobs/Orders/FindOrders?page=1&includeRequests=true
-
-
excludeNonRequests:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, only requested Orders will be returned
-
Example Usage
api/v1/Jobs/Orders/FindOrders?page=1&includeRequests=true&excludeNonRequests=true
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"OrderNumber": <string>,
"CustomerPONumber": <string>,
"VoyageNumber": <string>,
"OrderDate": <date>,
"IsRequest": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"Division":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Area": {
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Ship":
{
"Id": <GUID>,
"Name": <string>,
"IMONumber": <string>
},
"CustomerAccount":
{
"Id": <GUID>,
"Name": <string>,
"AccountNumber": <string>
},
"AgentAccount":
{
"Id": <GUID>,
"Name": <string>,
"AccountNumber": <string>
},
"AwardedToAccount":
{
"Id": <GUID>,
"Name": <string>,
"AccountNumber": <string>
},
"Trips": <Array>
[
{
"Id": <GUID>,
"OrderId": <GUID>,
"TripNumber": <string>,
"StartDate": <date>,
"EndDate": <date>,
"RequestedDate": <date>,
"IsRequestedDateFirm": <boolean>,
"EstimatedDuration": <decimal>,
"Status": <string>,
"IsRequest": <boolean>,
"OriginalTripId": <GUID>,
"CancelledDate": <datetime>,
"IsNoCharge": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"Triptype":
{
"Id": <GUID>,
"Name": <string>
},
"FromLocation":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"ToLocation":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Jobs" : <Array>
[
{
"Id": <GUID>,
"TripId": <GUID>,
"JobNumber": <string>,
"RequiredResourceType":
{
"Id": <GUID>,
"Name": <string>
},
"Resource": {
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Acknowledged": <boolean>,
"RunningTo": <decimal>,
"RunningFrom": <decimal>,
"StartDate": <date>,
"EndDate": <date>,
"PlannedStartDate": <date>,
"PlannedEndDate": <date>,
"CancelledDate": <date>,
"IsNoCharge": <boolean>,
"IsRequest": <boolean>
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
},
....
]
},
....
]
},
....
]
}
Part
Create/Update Part
URI
api/v1/hsqe/parts/CreateOrUpdatePart
Supported Verbs
- POST: insert and update one Part.
Required Parameters
-
Part Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Part Model to be created or updated.
-
Optional Parameters
-
Delete
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: To update and delete an existing part (must provide the part’s Id in Part Model)
-
Example Usage:
api/v1/hsqe/Parts/CreateOrUpdatePart?delete=true
-
Data Model
Part Model
{
"Id": <GUID>,
"PartNumber": <string>,
"CrossReferenceNumber": <string>,
"Description": <string>,
"Info": <string>,
"PartUnit": <string>,
"PartCategory": <string>,
"IsActive": <boolean>,
"IsCriticalSpare": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Part Object Fields
-
Id
-
DataType: Guid
-
Required: false when creating new data; true when updating existing data
-
Purpose: Update the uniquely matching Part.
-
-
PartNumber
-
DataType: string [max. 100 char]
-
Required: false
-
Purpose: Sets the part number.
-
-
CrossReferenceNumber
-
DataType: string [max. 100 char]
-
Required: false
-
Purpose: Sets the CrossReferenceNumber for the Part. Will be set to null if not specified.
-
-
Description
-
DataType: string [max. 2000 char]
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Description for the Part.
-
-
Info
-
DataType: string [max. 2000 char]
-
Required: false
-
Purpose: Sets the Additional Information for the Part. Will be set to null if not specified.
-
-
PartUnit
-
DataType: string [max. 200 char]
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the part’s measuring unit. If the unit does not exist, it will create one.
-
-
PartCategory
-
DataType: string [max. 200 char]
-
Required: false
-
Purpose: Sets the part’s category. If the category does not exist, it will create one.
-
-
IsActive
-
DataType: boolean
-
Required: false
-
Purpose: Sets whether the Part is active. Will be set to true if not specified.
-
-
IsCriticalSpare
-
DataType: boolean
-
Required: false
-
Purpose: Sets whether the Part is a critical spare. Will be set to false if not specified.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Part. Will be set to null if not specified.
-
Return Value
Action Accepted
Data:
{
"ActionType": <string>,
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>
},
....
]
}
-
ActionType: Insert or Update
-
Id: Guid for the new Part if ActionType is insert.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message
Part Contract
Create/Update Part Contract
URI
api/v1/hsqe/parts/CreateOrUpdatePartContract
Supported Verbs
- POST: insert and update one Part Contract. (API User must get response from POST before insert/update another Part Contract)
Required Parameters
-
Part Contract Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Part Contract Model to be created or updated.
-
Optional Parameters
-
Delete
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: To update and delete an existing part contract (must provide the part contract’s Id in Part Contract Model)
-
Example Usage:
api/v1/hsqe/Vendors/CreateOrUpdatePartContract?delete=true
-
Data Model
Part Contract Model
{
"Id": <GUID>,
"VendorId": <GUID>,
"PartId": <GUID>,
"VendorPartNumber": <string> [max. 100 char],
"Price": <decimal>,
"StartDate": <datetime>,
"EndDate": <datetime>,
"Info": <string>
}
Part Contract Object Fields
-
Id
-
DataType: Guid
-
Required: false when creating new data; true when updating existing data
-
Purpose: update the uniquely matching Part Contract.
-
-
VendorId
-
DataType: Guid
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets part contract’s vendor.
-
-
PartId
-
DataType: Guid
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets part contract’s part.
-
-
VendorPartNumber
-
DataType: string [max. 100 char]
-
Required: false
-
Purpose: Sets part contract’s vendor part number.
-
-
Price
-
DataType: decimal (positive, cannot be over 12 character length)
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets part contract’s price.
-
-
StartDate
-
DataType: datetime
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets part contract’s start date (start date and end date’s period cannot overlap another contract’s period).
-
-
EndDate
-
DataType: datetime
-
Required: false
-
Purpose: Sets part contract’s end date(start date and end date’s period cannot overlap another contract’s period).
-
-
Info
-
DataType: string [max. 2000 char]
-
Required: false
-
Purpose: Sets the part contract’s additional information.
-
Return Value
Action Accepted
Data:
{
"ActionType": <string>,
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>
},
....
]
}
-
ActionType: Insert or Update
-
Id: Guid for the new Part Contract if ActionType is insert.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message
Payroll
Find Payroll
URI
api/v1/Personnel/Payroll/FindPayroll
Supported Verbs
- GET: return a filtered list of payroll data. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/Personnel/Payroll/FindPayroll?page=2
-
Optional Parameters
-
PayrollPeriodId:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return payroll data from PayrollPeriodId
-
Example Usage:
api/v1/Personnel/Payroll/FindPayroll?page=2&PayrollPeriodId=15D06AF7-4AEA-11E7-80D9-00155D040945
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"PersonId": <GUID>,
"PayrollPeriodId": <GUID>,
"DivisionId": <GUID>,
"Payroll Group": {
"Id": <GUID>,
"Name": <string>,
"AccountingCode": <string>
},
"TransactionLines":
[
"Id": <GUID>,
"Rate": <decimal>,
"Quantity": <decimal>,
"Factor": <decimal>,
"Amount": <decimal>,
"StartDate": <date>,
"EndDate": <date>,
"AccountingCodes":
{
<string(ReferenceType)>:
{
"Id": <GUID>,
"AccountingCode": <string>,
"EntityName": <string>,
"ReferenceType": <string>
},
....
}
],
"PersonBankRecords":
[
{
"Id": <GUID>,
"Rate": <decimal>,
"Quantity": <decimal>,
"Factor": <decimal>,
"Amount": <decimal>,
"Date": <date>,
"IsWithdrawal": <boolean>,
"AccountingCodes":
{
<string(ReferenceType)>:
{
"Id": <GUID>,
"AccountingCode": <string>,
"EntityName": <string>,
"ReferenceType": <string>
},
....
}
}
]
}
]
}
}
Bank Balance
URI
api/v1/Personnel/Payroll/BankBalance
Supported Verbs
- GET: return a filtered list of person bank balances. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/Personnel/Payroll/BankBalance?page=2&PayrollPeriodId=6bdb2182-5145-11e7-ae3d-b8ca3ad31bab
-
-
PayrollPeriodId:
-
Data Type: Guid
-
Parameter Type: query string
-
Purpose: To specify the payroll period for which balances will be returned.
-
Example Usage:
api/v1/Personnel/Payroll/BankBalance?page=2&PayrollPeriodId=6bdb2182-5145-11e7-ae3d-b8ca3ad31bab
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"BankId": <GUID>,
"BankName": <string>,
"BankAccountingCode": <string>,
"PersonId": <GUID>,
"Balances": <Array>
[
{
"PayrollClassId": <GUID>,
"EarningCodeId": <GUID>,
"AssetId": <GUID>,
"CostCenterId": <GUID>,
"Rate": <decimal>,
"Factor": <decimal>,
"DivisionId": <GUID>,
"OpeningBalance": <decimal>,
"OpeningQuantity": <decimal>,
"ClosingBalance": <decimal>,
"ClosingQuantity": <decimal>
},
...
]
}
]
}
}
Find Payroll Periods
URI
api/v1/Personnel/PayrollPeriods/FindPayrollPeriods
Supported Verbs
- GET: return a filtered list of payroll periods. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/Personnel/PayrollPeriods/FindPayrollPeriods?page=2
-
Optional Parameters
-
Date:
-
Data Type: date
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return the payroll periods containing this date
-
Example Usage:
api/v1/Personnel/PayrollPeriods/FindPayrollPeriods?page=2&Date=2017-01-01T00:00:00-00:00
-
-
OnlyForExport:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, only payroll periods that are ready for Export, and have an EndDate before tomorrow’s date at midnight, are returned. For example, if the date at the time is 01/01/2018 13:37, tomorrow at midnight would be 02/01/2018 00:00. Ready for Export means only payroll periods where Exported is null and Posted is not null.
-
Example Usage:
api/v1/Personnel/PayrollPeriods/FindPayrollPeriods?page=2&OnlyForExport=true
-
-
NoPayrollGroupOnly:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, only payroll periods that don’t belong to a payroll group are returned.
-
Note: Cannot be used with PayrollGroupName
-
Example Usage:
api/v1/Personnel/PayrollPeriods/FindPayrollPeriods?page=2&NoPayrollGroupOnly=true
-
-
PayrollGroupName:
-
Data Type: string
-
Parameter Type: query string
-
Purpose: To specify the payroll group for which payroll period will be returned.
-
Note: Cannot be used with NoPayrollGroupOnly
-
Example Usage:
api/v1/Personnel/PayrollPeriods/FindPayrollPeriods?page=1&PayrollGroupName=Wheelhouse
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"StartDate": <date>,
"EndDate": <date>,
"PayrollGroup": {
"Id": <GUID>,
"Name": <string>,
"AccountingCode": <string>
}
}
]
}
}
Set Payroll Period Exported
URI
api/v1/Personnel/PayrollPeriods/SetPayrollPeriodExported
Supported Verbs
- POST: Mark or unmark a payroll periods’s exported date field
Required Parameters
-
PayrollPeriod Export Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies the Id of the target payroll period and the desired ExportDate
-
Data Model
Payroll Class Model
{
"Id": <GUID>,
"ExportDate": <date>,
"ResetExportDate": <boolean>
}
Payroll Class Object Fields
-
Id
-
Data Type: GUID
-
Required: true
-
Purpose: Identify the payroll period to update
-
-
ExportDate
-
Data Type: date
-
Required: false
-
Purpose: Sets the exported date field on the target payroll period
-
-
ResetExportDate
-
Data Type: boolean
-
Required: false
-
Purpose: If true, sets the exported date field on the target payroll period to NULL
-
Return Value
Action Accepted
Data:
{
"ActionType": <string>,
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>
},
....
]
}
-
ActionType: “Set Exported”, or “Remove Exported”
-
Id: Guid for the target payroll period
-
ErrorMsgs: Fields that have issues
-
Entity: Name of the field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message(s)
Payroll Class
Create/Update Payroll Class
URI
api/v1/Personnel/PayrollClasses/CreateOrUpdatePayrollClass
Supported Verbs
- POST: insert or update a payroll class.
Required Parameters
-
Payroll Class Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Payroll Class Model to be created or updated.
-
Data Model
Payroll Class Model
{
"Id": <GUID>,
"Name": <string>,
"AccountingCode": <string>,
"DoArchive": <boolean>
}
Payroll Class Object Fields
-
Id
-
DataType: GUID
-
Required: true when updating
-
Purpose: Identify the payroll class to update
-
-
Name
-
DataType: string [max. 200 char]
-
Required: true
-
Purpose: Sets the Name for the payroll class.
-
-
AccountingCode
-
DataType: string [max. 50 char]
-
Required: false
-
Purpose: Sets the AccountingCode for the payroll class.
-
-
DoArchive
-
DataType: boolean
-
Required: false
-
Purpose: Archive the payroll class.
-
Note: This field will be ignored when creating a new payroll class. Once archived, it can’t be reverted. Any payroll class earning codes will also be archived.
-
Return Value
Action Accepted
Data:
{
"ActionType": <string>,
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>
},
....
]
}
-
ActionType: Insert or Update
-
Id: Guid for the new payroll class if ActionType is insert.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message
Create/Update Payroll Class Earning Code
URI
api/v1/Personnel/PayrollClasses/CreateOrUpdatePayrollClassEarningCode
Supported Verbs
- POST: insert or update a payroll class earning code.
Required Parameters
-
Payroll Class Earning Code Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one payroll class Earning Code Model to be created or updated.
-
Data Model
Payroll Class Earning Code Model
{
"Id": <GUID>,
"PayrollClassId": <GUID>,
"QuantityType": <string>,
"EarningCode": {
"Id": <GUID>,
"Name": <string>
},
"Factor": <decimal>,
"Rate": <decimal>,
"AccrualFactor": <decimal>,
"EffectiveDate": <date>,
"DoArchive": <boolean>
}
Payroll Class Earning Code Object Fields
-
Id
-
DataType: GUID
-
Required: true when updating
-
Purpose: Identify the payroll class earning code to update
-
-
PayrollClassId
-
DataType: GUID
-
Required: true
-
Purpose: Sets the PayrollClassId for the payroll class earning code
-
-
QuantityType
-
DataType: string [max. 20 char]
-
Required: false
-
Purpose: Sets the QuantityType for the Earning Code.
-
Accepted Value: “fixed”, “daily”, “hourly”, “amount”
-
-
EarningCode
-
DataType: JSON Object
-
Required: true
-
Purpose: Sets the EarningCodeId for the payroll class earning code.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
-
-
Factor
-
DataType: decimal
-
Required: true
-
Purpose: Sets the Factor for the payroll class earning code.
-
-
Rate
-
DataType: decimal
-
Required: true
-
Purpose: Sets the Rate for the payroll class earning code.
-
-
AccrualFactor
-
DataType: decimal
-
Required: true
-
Purpose: Sets the AccrualFactor for the payroll class earning code.
-
-
EffectiveDate
-
DataType: date
-
Required: true
-
Purpose: Sets the EffectiveDate for the payroll class earning code.
-
-
DoArchive
-
DataType: boolean
-
Required: false
-
Purpose: Archive the payroll class earning code.
-
Note: This field will be ignored when creating a new payroll class earning code. Once archived, it can’t be reverted.
-
Return Value
Action Accepted
Data:
{
"ActionType": <string>,
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>
},
....
]
}
-
ActionType: Insert or Update
-
Id: Guid for the new payroll class if ActionType is insert.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message
Find Payroll Class
URI
api/v1/Personnel/PayrollClasses/FindPayrollClasses
Supported Verbs
- GET: return a filtered list of payroll classes and its earning codes. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/Personnel/PayrollClasses/FindPayrollClasses?page=2
-
Optional Parameters
-
Name:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return payroll class with Name containing the string
-
Example Usage:
api/v1/Personnel/PayrollClasses/FindPayrollClasses?page=2&Name=Foo
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"Name": <string>,
"AccountingCode": <string>,
"EarningCodes" [
{
"Id": <GUID>,
"PayrollClassId": <GUID>,
"QuantityType": <string>,
"EarningCode": {
"Id": <GUID>,
"Name": <string>
},
"Factor": <decimal>,
"Rate": <decimal>,
"AccrualFactor": <decimal>,
"EffectiveDate": <date>
}, ...
]
},
...
]
}
}
Requisition
Update Requisition
URI
api/v1/hsqe/Requisitions/UpdateRequisition
Supported Verbs
- POST: update a requisition.
Required Parameters
-
Requisition Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Requisition Model to be updated.
-
Optional Parameters
-
UpdateInventory
-
Data Type: Boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, if the requisition is set to ‘Received On Asset’, It will update the inventory count (If tenant and user have permission to inventory app).
-
Example Usage:
api/v1/hsqe/Requisitions/UpdateRequisition?UpdateInventory=true
-
Data Model
Requisition Model
{
"Id": <GUID>,
"Name": <string> [max. 100 char],
"Status": <string> ["New", "Confirmed", "Ordered", "Received On Shore", "Received On Asset", "Closed", "Canceled"],
"DueDate": <datetime>,
"Priority": <string> ["Low", "Medium", "High"],
"LinkedItemType": <string> ["Inspection", "Maintenance", "Inventory", "Form", "Task", "Corrective Action"],
"LinkedItemId": <GUID>
}
Requisition Object Fields
-
Id
-
DataType: Guid
-
Required: true
-
Purpose: Update the uniquely matching Requisition.
-
-
Name
-
DataType: string [max. 100 char]
-
Required: false
-
Purpose: Sets the Name for the Requisition.
-
-
Status
-
DataType: string [“New”, “Confirmed”, “Ordered”, “Received On Shore”, “Received On Asset”, “Closed”, “Canceled”],
-
Required: false
-
Purpose: Sets all the Line Item within the requisition to one of the status specified.
-
Note: Line Item status will not change if the status is already one of the following: ‘Received On Asset’, ‘Closed’, ‘Canceled’ or ‘Deleted’
-
-
DueDate
-
DataType: datetime
-
Required: false
-
Purpose: Sets the due date for the Requisition.
-
-
Priority
-
DataType: string [“Low”, “Medium”, “High”],
-
Required: false
-
Purpose: Sets the priority for the Requisition.
-
-
LinkedItemType
-
DataType: string [“Inspection”, “Maintenance”, “Inventory”, “Form”, “Task”, “Corrective Action”],
-
Required: false
-
Purpose: Sets the linked item type for the Requisition.
-
Note: If the LinkedItemType is set, then user must provide LinkedItemId and vice versa.
-
-
LinkedItemId
-
DataType: Guid
-
Required: false
-
Purpose: Sets the linked item Id for the Requisition.
-
Note: If the LinkedItemId is set, then user must provide LinkedItemType and vice versa.
-
Return Value
Action Accepted
"Data":
{
"ActionType": <string>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>
},
....
]
}
-
ActionType: Update
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message
Update Line Item
URI
api/v1/hsqe/Requisitions/UpdateLineItem
Supported Verbs
- POST: update a single Line Item.
Required Parameters
-
Line Item Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Line Item Model to be updated.
-
Optional Parameters
-
UpdateInventory
-
Data Type: Boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, if the Line Item is set to ‘Received On Asset’, It will update the inventory count (If tenant and user have permission to inventory app).
-
Example Usage:
api/v1/hsqe/Requisitions/UpdateLineItem?UpdateInventory=true
-
Data Model
Line Item Model
{
"Id": <GUID>,
"PartId": <GUID>,
"VesselComponentId": <GUID>,
"Description": <string> [max. 100 char],
"Quantity": <integer> or <decimal>
"EstPrice": <decimal>,
"VendorId": <GUID>,
"Status": <string> ["New", "Confirmed", "Ordered", "Received On Shore", "Received On Asset", "Closed", "Canceled"],
"Type": <string> ["Labor", "Part"]
}
Line Item Object Fields
-
Id
-
DataType: Guid
-
Required: true
-
Purpose: Update the uniquely matching Line Item.
-
-
PartId
-
DataType: Guid
-
Required: false
-
Purpose: Sets the part id for the Line Item.
-
-
VesselComponentId
-
DataType: Guid
-
Required: false
-
Purpose: Sets the associated vessel component id for the line item.
-
Note: the vessel component should be on the Requisition’s asset.
-
-
Description
-
DataType: string [max. 100 char]
-
Required: false
-
Purpose: Sets the Description for the Line Item.
-
-
Quantity
-
DataType: integer or decimal (See notes),
-
Required: false
-
Purpose: Sets the quantity for the Line Item.
-
Note: If the Line Item type is labor, then the quantity can be decimal, otherwise the quantity have to be integer only.
-
-
EstPrice
-
DataType: decimal
-
Required: false
-
Purpose: Sets the estimated price for the Line Item.
-
-
VendorId
-
DataType: Guid,
-
Required: false
-
Purpose: Sets the vendor id for the Line Item.
-
-
Status
-
DataType: string [“New”, “Confirmed”, “Ordered”, “Received On Shore”, “Received On Asset”, “Closed”, “Canceled”],
-
Required: false
-
Purpose: Sets the Line Item to one of the statuses specified.
-
Note: Line Item status cannot be changed if the status is already one of the following: ‘Received On Asset’, ‘Closed’, ‘Canceled’ or ‘Deleted’
-
-
Type
-
DataType: string [“Labor”, “Part”]
-
Required: false
-
Purpose: Sets the type for the Line Item.
-
Return Value
Action Accepted
"Data":
{
"ActionType": <string>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>
},
....
]
}
-
ActionType: Update
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message
Find Requisitions
URI
api/v1/hsqe/Requisitions/FindRequisitions
Supported Verbs
- GET: return a filtered list of in progress requisitions (unless user find requistion by Id). the data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/hsqe/Requisitions/FindRequisitions?page=2
-
Optional Parameters
-
SearchString:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Requisition with Name containing the string.
-
Example Usage:
api/v1/hsqe/Requisitions/FindRequisitions?page=2&SearchString=Foo
-
-
ExternalNumber:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Requisition with External Number equals to the string.
-
Example Usage:
api/v1/hsqe/Requisitions/FindRequisitions?page=2&ExternalNumber=FX-1000
-
-
Id:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Requisition with Id equals to the Guid.
-
Note: If Id is set, then the endpoint will ignore other optional parameters.
-
Example Usage:
api/v1/hsqe/Requisitions/FindRequisitions?page=2&Id=00000000-0000-0000-0000-000000000000
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"Created": <datetime>,
"DueDate": <datetime>,
"Name": <string>,
"Space": <string>,
"Priority": <string>,
"ExternalNumber": <string>,
"LineItemCount": <integer>,
"Status": <string>,
"DivisionId": <GUID>,
"CreatedById": <GUID>,
"CreatedBy" : {
"FirstName": <string>,
"MiddleName": <string>,
"LastName": <string>
},
"Asset": <string>,
"EstCost": <decimal>,
"LinkedItemType": <string>,
"LinkedItemId": <GUID>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
},
...
]
}
}
Find Line Items
URI
api/v1/hsqe/Requisitions/FindLineItems
Supported Verbs
- GET: return a filtered list of in progress Line Items (unless user find line item by Id). the data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/hsqe/Requisitions/FindLineItems?page=2
-
Optional Parameters
-
SearchString:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Line Item with description containing the string.
-
Example Usage:
api/v1/hsqe/Requisitions/FindLineItems?page=2&SearchString=Foo
-
-
ExternalNumber:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Requisition with External Number equals to the string.
-
Example Usage:
api/v1/hsqe/Requisitions/FindLineItems?page=2&ExternalNumber=FX-1000
-
-
RequisitionId:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Line Item with RequisitionId equals to the Guid.
-
Note: If RequisitionId is set, then the endpoint will ignore above optional parameters.
-
Example Usage:
api/v1/hsqe/Requisitions/FindLineItems?page=2&RequisitionId=00000000-0000-0000-0000-000000000000
-
-
Id:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Line Item with Id equals to the Guid.
-
Note: If Id is set, then the endpoint will ignore above optional parameters.
-
Example Usage:
api/v1/hsqe/Requisitions/FindLineItems?page=2&Id=00000000-0000-0000-0000-000000000000
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"Created": <datetime>,
"Description": <string>,
"ExternalNumber": <string>,
"RequisitionId": <GUID>,
"Space": <string>,
"DueDate": <datetime>,
"Priority": <string>,
"VendorName": <string>,
"Quantity": <decimal>,
"EstPrice": <decimal>,
"PartId": <GUID>,
"PartDescription": <string>,
"PartNumber": <string>,
"PartUnit": <string>,
"PartCategory": <string>,
"Status": <string>,
"Type": <string>,
"Asset": <string>,
"CreatedById": <GUID>,
"CreatedBy" : {
"FirstName": <string>,
"MiddleName": <string>,
"LastName": <string>
},
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
},
...
]
}
}
Resources
URI
api/v2/public/Resources
Supported Verbs
-
GET
- Find Resources. Assets will also be found as Resources.
-
POST
- Create new Resources. Does not create Assets.
- Add Operating Areas to existing Resources and Assets.
-
PATCH
- Update existing Resources and Assets.
-
DELETE
- Remove Operating Areas from existing Resources and Assets.
Data Models
Resource Model
{
"Id": <GUID>,
"Name": <string>,
"ShortName": <string>,
"ExternalSystemCode": <string>,
"AccountingCode": <string>,
"ResourceType": {
"Id": <GUID>,
"Name": <string>
},
"Division": {
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"OperatingAreas": <Array>
[
{
"Id": <GUID>,
"Name": <string>
},
...
],
"Owner": {
"Id": <GUID>,
"Name": <string>
},
"Ship": {
"Id": <GUID>,
"Name": <string>,
"IMONumber": <string>
},
"IMONumber": <string>,
"MMSI": <string>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Resource Fields
-
Id
-
DataType: Guid
-
Required: False when using POST to create, True when using PATCH to update (unless Id is already specified in the URI).
-
Purpose: To uniquely identify a Resource and to specify which Resource to apply an operation to.
-
-
Name
-
DataType: string [max. 200 char]
-
Required: True when using POST to create, False when using PATCH to update.
-
Filterable: True
-
Purpose: Specifies the name of a Resource.
-
-
ShortName
-
DataType: string [max. 100 char]
-
Required: False
-
Filterable: True
-
Purpose: Specifies a shortened name for a Resource.
-
-
ExternalSystemCode
-
DataType: string [max. 200 char]
-
Required: False
-
Filterable: True
-
-
AccountingCode
-
DataType: string [max. 50 char]
-
Required: False
-
Filterable: True
-
-
ResourceType
-
DataType: object
-
Required: False
-
Purpose: Defines the Resource Type of the Resource.
-
Fields:
- Id:
<Guid>
: required - Name:
<string>
: read-only
- Id:
-
-
Division
-
DataType: object
-
Required: True when using POST to create, False when using PATCH to update.
-
Purpose: Defines the Division of the Resource.
-
Fields:
- Id:
<Guid>
: required - Name:
<string>
: read-only - ExternalSystemCode:
<string>
: read-only
- Id:
-
-
OperatingArea
-
DataType: Array
-
Required: False
-
Purpose: Defines the Operating Areas for this Resource. Operating Areas are Locations with
IsArea=true
. Operating Areas must not be redundant (for example, an Operating Area that is the root of the locations tree can not be specified at the same time as a location that is a child of that location). -
Fields:
- Id
<GUID>
: required for each Location - Name
<string>
: read-only
- Id
-
-
Owner
-
DataType: object
-
Required: False
-
Purpose: Defines the Owner of the Resource, where Owner is a Company.
-
Fields:
- Id:
<Guid>
: required - Name:
<string>
: read-only
- Id:
-
-
Ship
-
DataType: object
-
Required: False
-
Purpose: Defines the Ship this Resource is associated with.
-
Fields:
- Id:
<Guid>
: required - Name:
<string>
: read-only - IMONumber:
<string>
: read-only
- Id:
-
-
IMONumber
-
DataType: string [max. 100 char]
-
Required: False
-
Purpose: The IMO Number of this resource
-
Filterable: True
-
-
MMSI
-
DataType: string [max. 100 char]
-
Required: False
-
Purpose: The MMSI of this resource
-
Filterable: True
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: False
-
Purpose: Sets the UserDefined for the Resource. Will be set to null if not specified. It is not currently possible to update this field on assets from this endpoint, use the Update Asset endpoint instead.
-
Error Model
{
"ErrorCode": <integer>,
"ErrorMessage": <string>
}
Error Model Fields
-
ErrorCode
-
DataType: integer
-
Purpose: An integer that uniquely identifies this type of error.
-
-
ErrorMessage
-
DataType: string
-
Purpose: A message which describes what the error means.
-
Find Resources
URI
GET api/v2/public/Resources
or
GET api/v2/public/Resources/{Id}
Example Usage
// Get a paginated response of all resources
GET api/v2/public/Resources
// Get a specific resource by Id
GET api/v2/public/Resources/d21d73fb-bb69-11e8-8102-00155d040945
Required Parameters
- None
Optional Parameters
-
page
:-
Data Type: integer
-
Parameter Type: query string
-
Default Value: 1
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
GET api/v2/public/Resources?page=2
-
-
$filter
:-
Data Type: string
-
Parameter Type: query string
-
Default Value: empty
-
Purpose: Controls filtering the returned data. See fields that have “Filterable: true”.
-
Example Usage:
// Get Resources with Name equal to "Boat" GET api/v2/public/Resources?$filter=Name eq 'Boat' // Get Resources with ShortName equal to "MVQ" GET api/v2/public/Resources?$filter=ShortName eq 'MVQ'
-
Required Permissions
One or both of the following:
- Setup > Jobs > Ships > Resources > Read
- Setup > Jobs > Ships > Resources > Edit
Return Value
Action Accepted
Returns an array containing the requested Resources in the format of the Resource Model.
{
"Page": <integer>,
"Next": <URI>,
"Results": <Array of Resource Model>
}
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Create Resources
URI
POST api/v2/public/Resources
Example Usage
// Create one Resource with two operating areas
POST api/v2/public/Resources
{
"Name": "Tug One",
"Division": {
"Id": "8a4cf888-5b12-11e9-9d21-6c8814184910"
},
"OperatingAreas": [
{
"Id": "1edfb9d4-5b12-11e9-9d21-6c8814184910"
},
{
"Id": "7593fd18-5f9c-11e9-9d22-f01faf02f2e9"
}
]
}
Required Parameters
-
Data Type: Resource Model or Array of Resource Model
-
Parameter Type: request body
-
Purpose: Supplies the Resource(s) to be created.
Required Permissions
- Setup > Jobs > Ships > Resources > Edit
Return Value
Action Accepted
Returns an array containing the created Resources.
<Array of Resource Model>
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Update Resources
URIs
Update a Resource
PATCH api/v2/public/Resources/
or
PATCH api/v2/public/Resources/{Id}
Add an Operating Area to a Resource
POST api/v2/public/Resources/{Id}/operatingareas
Remove an Operating Area from a Resource
DELETE api/v2/public/Resources/{Id}/operatingareas/{OperatingAreaId}
Required Parameters
-
Id
:-
Data Type: Guid
-
Parameter Type: request path or request body
-
Purpose: To specify which Resource to apply an operation to.
-
Example Usage:
// Update a Resource Name by providing the Id in the request path PATCH api/v2/public/Resources/c5e69784-24c5-11e7-82c5-f01faf32a6aa { "Name": "USS Enterprise" } // Update the Name of multiple Resources by providing the Id in the request body PATCH api/v2/public/Locations [ { "Id": "c5e69784-24c5-11e7-82c5-f01faf32a6aa", "Name": "Excelsior" }, { "Id": "d21d73fb-bb69-11e8-8102-00155d040945", "Name": "Voyager" } ] // Remove the Owner from a Resource PATCH api/v2/public/Resources/c5e69784-24c5-11e7-82c5-f01faf32a6aa { "Owner": null } // Add an Operating Area to an existing Resource POST api/v2/public/Resources/c5e69784-24c5-11e7-82c5-f01faf32a6aa/operatingareas { "Id": "c5e69784-24c5-11e7-82c5-f01faf32a6aa" }
-
Optional Parameters
-
OperatingAreaId
:-
Data Type: Guid
-
Parameter Type: request path
-
Purpose: To specify which Resource Operating Area to apply an operation to.
-
Example Usage:
// To remove an Operating Area (with Id of 7694520e-b2de-4dbe-9d6d-fbf8addd8a28) from a Resource DELETE api/v2/public/Resources/c5e69784-24c5-11e7-82c5-f01faf32a6aa/operatingareas/7694520e-b2de-4dbe-9d6d-fbf8addd8a28
-
Required Permissions
- Setup > Jobs > Ships > Resources > Edit
Return Value
Action Accepted
Returns an array containing the modified Resources.
<Array of Resource Model>
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Resource Type
URI
api/v2/public/ResourceTypes
Supported Verbs
GET
- Find Resource Types.
Data Models
Resource Type Model
{
"Id": <GUID>,
"Name": <string>,
"Parent": {
"Id": <GUID>,
"Name": <string>
}
}
Resource Type Fields
-
Id
-
DataType: Guid
-
Purpose: To uniquely identify a resource type.
-
-
Name
-
DataType: string [max. 200 char]
-
Filterable: true
-
Purpose: Specifies the name of a resource type.
-
-
Parent
-
DataType: object
-
Required: false
-
Purpose: Specifies the parent resource type for this resource type. Null if this resource type has no parent.
-
Fields:
- Id
<GUID>
- Name
<string>
- Id
-
Error Model
{
"ErrorCode": <integer>,
"ErrorMessage": <string>
}
Error Model Fields
-
ErrorCode
-
DataType: integer
-
Purpose: An integer that uniquely identifies this type of error.
-
-
ErrorMessage
-
DataType: string
-
Purpose: A message which describes what the error means.
-
Find Resource Types
URI
GET api/v2/public/ResourceTypes
Example Usage
GET api/v2/public/ResourceTypes
Required Parameters
- None
Optional Parameters
-
page
:-
Data Type: integer
-
Parameter Type: query string
-
Default Value: 1
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
GET api/v2/public/ResourceTypes?page=2
-
-
$filter
:-
Data Type: string
-
Parameter Type: query string
-
Default Value: empty
-
Purpose: Controls filtering the returned data. See fields that have “Filterable: true”.
-
Example Usage:
// Get Resource Types with Name equal to "Battleship" GET api/v2/public/ResourceTypes?$filter=Name eq 'Battleship'
-
Return Value
Action Accepted
Returns an array containing the requested Resource Types in the format of the Resource Types Model.
{
"Page": <integer>,
"Next": <URI>,
"Results": <Array of Resource Type Model>
}
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Required Permissions
Either one of:
- Setup > Jobs > Ships > Resources > Read
- Setup > Jobs > Ships > Resources > Edit
Ship
Create/Update Ship
URI
api/v1/jobs/ships/CreateOrUpdateShip
Supported Verbs
- POST: insert or update a ship.
Required Parameters
-
Ship Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one or more Ship Model to be created or updated.
-
-
MatchingField
-
Data Type: String
-
Required: true
-
Data Type: query string
-
Accepted Value: “imo”, “mmsi”, “name”, “callsign”
-
Purpose: matching field will be used to potentially identify the ship to update
-
Example Usage:
api/v1/jobs/ships/CreateOrUpdateShip?matchingField=mmsi
-
Optional Parameters
-
asRequest
-
Data Type: Boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, instead of creating or updating a Ship directly, a Request for those changes will be created.
-
Example Usage:
api/v1/jobs/ships/CreateOrUpdateShip?matchingField=MMSI&asRequest=true
-
Data Model
Ship Model
{
"Name": <string>,
"MMSI": <string>,
"IMONumber": <string>,
"CallSign": <string>,
"Nation": <string>,
"ShipType": <string>,
"Beam": <decimal>,
"Deadweight": <decimal>,
"GT": <decimal>,
"Height": <decimal>,
"NT": <decimal>,
"LOA": <decimal>,
"TEU": <decimal>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Ship Object Fields
-
Name
-
DataType: string [max. 150 char]
-
Required: true
-
Purpose: Sets the Name for the Ship.
-
-
MMSI
-
DataType: string [max. 50 char]
-
Required: see Note
-
Purpose: Sets the MMSI for the Ship.
-
-
IMONumber
-
DataType: string [max. 100 char]
-
Required: see Note
-
Purpose: Sets the IMONumber for the Ship.
-
-
CallSign
-
DataType: string [max. 50 char]
-
Required: see Note
-
Purpose: Sets the CallSign for the Ship.
-
-
Nation
-
DataType: string [max. 50 char]
-
Required: false
-
Purpose: Sets the Nation for the Ship.
-
-
ShipType
-
DataType: string [max. 200 char]
-
Required: false
-
Purpose: Sets the ShipType for the Ship.
-
Note: If the ShipType doesn’t exist in Helm CONNECT, it will be treated as null and won’t update the existing ShipType.
-
-
Beam
-
DataType: decimal
-
Required: false
-
Purpose: Sets the Beam for the Ship.
-
-
Deadweight
-
DataType: decimal
-
Required: false
-
Purpose: Sets the Deadweight for the Ship.
-
-
Height
-
DataType: decimal
-
Required: false
-
Purpose: Sets the Height for the Ship.
-
-
GT
-
DataType: decimal
-
Required: false
-
Purpose: Sets the GT for the Ship.
-
-
NT
-
DataType: decimal
-
Required: false
-
Purpose: Sets the NT for the Ship.
-
-
TEU
-
DataType: decimal
-
Required: false
-
Purpose: Sets the TEU for the Ship.
-
-
LOA
-
DataType: decimal
-
Required: false
-
Purpose: Sets the LOA for the Ship.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Ship.
-
Return Value
Action Accepted
"Data":
{
"ActionType": <string>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>,
"Details": <string>
},
....
]
}
-
ActionType: Insert or Update
-
ErrorMsgs: Fields that has issue.
-
Entity: name of the Field
-
Message: Error message
-
Details: Additional information about the error.
Action Rejected
"Data": <Array>
- Data: Error Message
Note: ImoNumber, MMSI, CallSign are not required fields when updating. However, one of them needs to be present when inserting.
Find Ships
URI
api/v1/jobs/ships/FindShips
Supported Verbs
- GET: return a filtered list of Ships. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/jobs/ships/FindShips?page=2
-
Optional Parameters
-
Id:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return the Ship with given Id
-
Example Usage:
api/v1/jobs/ships/FindShips?page=1&Id=530e6fbb-d304-477a-9a2c-c0d0810f38ff
-
-
IMO:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Ships with given IMO
-
Example Usage:
api/v1/jobs/ships/FindShips?page=1&IMO=1234567
-
-
MMSI:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Ships with given MMSI
-
Example Usage:
api/v1/jobs/ships/FindShips?page=1&MMSI=123456789
-
-
Name:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Ships with given name
-
Example Usage:
api/v1/jobs/ships/FindShips?page=1&Name=ShippyMcShip
-
-
includeRequests:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, requested Ships will also be returned
-
Example Usage
api/v1/jobs/ships/FindShips?page=1&includeRequests=true
-
-
excludeNonRequests:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, only requested Ships will be returned
-
Example Usage
api/v1/jobs/ships/FindShips?page=1&includeRequests=true&excludeNonRequests=true
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"Name": <string>,
"MMSI": <string>,
"IMONumber": <string>,
"CallSign": <string>,
"Nation": <string>,
"ShipType": <string>,
"Beam": <decimal>,
"Deadweight": <decimal>,
"GT": <decimal>,
"Height": <decimal>,
"NT": <decimal>,
"LOA": <decimal>,
"TEU": <decimal>,
"IsRequest": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
},
....
]
}
Tasks
Create/Update Task
URI
api/v1/hsqe/actionitems/CreateOrUpdateTask
Supported Verbs
- POST: Insert or update a task.
Required Parameters
-
Task Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Task Model to be created or updated.
-
Data Model
Task Model
{
"Id": <GUID>,
"AssetId": <GUID>,
"ComponentId": <GUID>,
"LocationId": <GUID>,
"SpaceId": <GUID>,
"CreatedById": <GUID>,
"DeletedById": <GUID>,
"DueDate": <date>,
"CompletedDate": <datetime>,
"DeletedDate": <datetime>,
"Description": <string>,
"AssignTo": <string>,
"Severity": <string>,
"CompleteNote": <string>,
"DeleteNote": <string>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"Tags": <Array>
[
<string>,
....
],
"AssigneeIds": <Array>
[
<GUID>,
....
],
"CompletedByIds": <Array>
[
<GUID>,
....
],
"VendorIds": <Array>
[
<GUID>,
....
],
"PartUsages": <Array>
[
<PartUsageModel>,
....
]
}
PartUsageModel Model
{
"PartId": <GUID>,
"AssetId": <GUID>,
"Quantity": <int>
}
Task Object Fields
-
Id
-
DataType: Guid
-
Required: false when creating new data; true when updating existing data
-
Purpose: update the uniquely matching Task.
-
-
AssetId
-
DataType: Guid
-
Required: true
-
Purpose: Sets the Asset for the task.
-
-
ComponentId
-
DataType: Guid
-
Required: false
-
Purpose: Sets the Component for the task.
-
-
LocationId
-
DataType: Guid
-
Required: false
-
Purpose: Sets the Location for the task.
-
-
SpaceId
-
DataType: Guid
-
Required: true
-
Purpose: Sets the Space for the task.
-
-
CreatedById
-
DataType: Guid
-
Required: true
-
Purpose: Sets the Created Person for the task.
-
-
DeletedById
-
DataType: Guid
-
Required: true when deleting task
-
Purpose: Sets the Deleted Person for the task.
-
-
DueDate
-
DataType: date
-
Required: true
-
Purpose: Sets the Due Date for the task.
-
-
CompletedDate
-
DataType: datetime
-
Required: false; Sets to now if not specified when completing task
-
Purpose: Sets the Completed Date for the task.
-
-
DeletedDate
-
DataType: datetime
-
Required: false; Sets to now if not specified when deleting task
-
Purpose: Sets the Deleted Date for the task.
-
-
Description
-
DataType: string [max. 400 char]
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Task Description for the task.
-
-
AssignTo
-
DataType: string [max. 50 char]
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Assign to for the task.
-
Note: AssignTo can be one of the following values and is not case sensitive:
-
“Asset”: will assign this Task to asset
-
“Shore”: will assign this Task to shore
-
“DryDock”: will assign this Task to dry dock
-
-
-
Severity
-
DataType: string [max. 16 char]
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Severity for the task.
-
Note: Severity can be one of the following values and is not case sensitive:
-
“Low”: will mark this Task Severity as low
-
“Medium”: will mark this Task Severity as medium
-
“High”: will mark this Task Severity as high
-
-
-
CompleteNote
-
DataType: string [max. 2000 char]
-
Required: false
-
Purpose: Sets the Note for completing task.
-
-
DeleteNote
-
DataType: string [max. 2000 char]
-
Required: true when deleting task
-
Purpose: Sets the Note for deleting task.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the task. Will be set to null if not specified.
-
-
Tags
-
DataType: array of
<string>
-
Required: false
-
Purpose: Sets the Tags for the task. If the tag does not exist, it will create one.
-
-
AssigneeIds
-
DataType: array of
<GUID>
-
Required: false
-
Purpose: Sets the Assignee for the task.
-
-
CompletedByIds
-
DataType: array of
<GUID>
-
Required: false
-
Purpose: Sets the Completed Person for the task.
-
-
VendorIds
-
DataType: array of
<GUID>
-
Required: false
-
Purpose: Sets the Vendors for the task.
-
-
PartUsages
-
DataType: array of JSON PartUsage Objects (see below)
-
Required: false
-
Purpose: Sets the PartUsages for the task.
-
PartUsage Object Fields
-
PartId
-
DataType: Guid
-
Required: true
-
Purpose: Sets the Part for the task part usages.
-
-
AssetId
-
DataType: Guid
-
Required: true
-
Purpose: Sets the Asset for the task part usages.
-
-
Quantity
-
DataType: int
-
Required: true
-
Purpose: Sets the Quantity for the task part usages.
-
PartUsage Object Fields
Return Value
Action Accepted
Data:
{
"ActionType": <string>,
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>
},
....
]
}
-
ActionType: Insert or Update
-
Id: Guid for the new Task if ActionType is insert.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message
Find Task By Id
URI
api/v1/hsqe/actionitems/FindTaskById
Supported Verbs
- GET: return a filtered list of tasks.
Required Parameters
-
TaskId:
-
Data Type: Guid
-
Parameter Type: query string
-
Purpose: return task with given TaskId
-
Example Usage:
api/v1/hsqe/actionitems/FindTaskById?TaskId=530e6fbb-d304-477a-9a2c-c0d0810f38ff
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"Description": <string>,
"SourceType": <string>,
"AssignTo": <string>,
"Severity": <string>,
"Status": <string>,
"AssetId": <GUID>,
"Asset": <string>,
"ComponentId": <GUID>,
"Component": <string>,
"LocationId": <GUID>,
"Location": <string>,
"SpaceId": <GUID>,
"Space": <string>,
"DueDate": <datetime>,
"CreatedById": <GUID>,
"CreatedBy": <string>,
"CreatedDate": <datetime>,
"CompletedBy": <Array>
[
{
"Id": <GUID>,
"PersonId": <GUID>,
"Name": <string>,
},
....
],
"CompletedDate": <datetime>,
"CompleteNote": <string>,
"DeletedById": <GUID>,
"DeletedBy": <string>,
"DeletedDate": <datetime>,
"DeleteNote": <string>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"Tags": <Array>
[
<string>,
....
],
"Assignee": <Array>
[
{
"Id": <GUID>,
"PersonId": <GUID>,
"Name": <string>,
},
....
],
"Vendors": <Array>
[
{
"Id": <GUID>,
"VendorId": <GUID>,
"Name": <string>,
},
....
],
"PartUsages": <Array>
[
{
"Id": <GUID>,
"PartId": <GUID>,
"Part": <string>,
"AssetId": <GUID>,
"Asset": <string>,
"Quantity": <int>,
},
....
]
},
...
]
}
}
Find Tasks
URI
api/v1/hsqe/actionitems/FindTasks
Supported Verbs
- GET: return a filtered list of tasks sorted by CreatedDate descending, then Description ascending and Id ascending order. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/hsqe/actionitems/FindTasks?page=2
-
Optional Parameters
-
SearchString:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return tasks with Description containing the string
-
Example Usage:
api/v1/hsqe/actionitems/FindTasks?page=2&SearchString=Foo
-
-
AssetId:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return tasks with given AssetId
-
Example Usage:
api/v1/hsqe/actionitems/FindTasks?page=2&AssetId=530e6fbb-d304-477a-9a2c-c0d0810f38ff
-
-
ComponentId:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return tasks with given ComponentId
-
Example Usage:
api/v1/hsqe/actionitems/FindTasks?page=2&ComponentId=530e6fbb-d304-477a-9a2c-c0d0810f38ff
-
-
OpenTasks:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not set, will return non-deleted tasks. When true, will return open tasks only. Otherwise, will return completed tasks only.
-
Example Usage:
api/v1/hsqe/actionitems/FindTasks?page=2&OpenTasks=true
-
-
IncludeArchived:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When false, will return non-deleted tasks only. Otherwise, will return deleted tasks as well.
-
Example Usage:
api/v1/hsqe/actionitems/FindTasks?page=2&IncludeArchived=true
-
-
FromDate:
-
Data Type: date
-
Parameter Type: query string
-
Default Value: When SearchString is not blank, will default to ToDate - 366 days (or Now - 366 days if ToDate is blank). Otherwise, will default to null.
-
Purpose: When not null, will return tasks when the CreatedDate is >= FromDate
-
Note: When SearchString, FromDate and ToDate are not blank, FromDate cannot be earlier than ToDate - 366 days.
-
Example Usage:
api/v1/hsqe/actionitems/FindTasks?page=2&FromDate=2016-03-10T14:23:00-08:00
-
-
ToDate:
-
Data Type: date
-
Parameter Type: query string
-
Default Value: When SearchString is not blank, will default to FromDate + 366 days (or Now if FromDate is blank). Otherwise, will default to null.
-
Purpose: When not null, will return tasks when the CreatedDate is <= ToDate.
-
Note: When SearchString, FromDate and ToDate are not blank, ToDate cannot be later than FromDate + 366 days.
-
Example Usage
api/v1/hsqe/actionitems/FindTasks?page=2&ToDate=2016-03-10T14:23:00-08:00
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"Description": <string>,
"SourceType": <string>,
"AssignTo": <string>,
"Severity": <string>,
"Status": <string>,
"AssetId": <GUID>,
"Asset": <string>,
"ComponentId": <GUID>,
"Component": <string>,
"LocationId": <GUID>,
"Location": <string>,
"SpaceId": <GUID>,
"Space": <string>,
"DueDate": <datetime>,
"CreatedById": <GUID>,
"CreatedBy": <string>,
"CreatedDate": <datetime>,
"CompletedBy": <Array>
[
{
"Id": <GUID>,
"PersonId": <GUID>,
"Name": <string>,
},
....
],
"CompletedDate": <datetime>,
"CompleteNote": <string>,
"DeletedById": <GUID>,
"DeletedBy": <string>,
"DeletedDate": <datetime>,
"DeleteNote": <string>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"Tags": <Array>
[
<string>,
....
],
"Assignee": <Array>
[
{
"Id": <GUID>,
"PersonId": <GUID>,
"Name": <string>,
},
....
],
"Vendors": <Array>
[
{
"Id": <GUID>,
"VendorId": <GUID>,
"Name": <string>,
},
....
],
"PartUsages": <Array>
[
{
"Id": <GUID>,
"PartId": <GUID>,
"Part": <string>,
"AssetId": <GUID>,
"Asset": <string>,
"Quantity": <int>,
},
....
]
},
...
]
}
}
Tax Types
Create/Update Tax Type
URI
api/v1/jobs/TaxTypes/CreateOrUpdateTaxType
Supported Verbs
- POST: insert or update a tax type.
Required Parameters
-
Tax Type Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies a Tax Type Model to be created or updated.
-
Data Model
Tax Type Model
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>,
"AccountingCode": <string>,
"UsesExternalSystem": <boolean>
}
Tax Type Object Fields
-
Id
-
DataType: GUID
-
Required: true when updating
-
Purpose: Identify the Tax Type to update.
-
-
Name
-
DataType: string [max. 400 char]
-
Required: true
-
Purpose: Sets the Name for the Tax Type.
-
-
ExternalSystemCode
-
DataType: string [max. 200 char]
-
Required: false
-
Purpose: Sets the ExternalSystemCode for the Tax Type.
-
-
AccountingCode
-
DataType: string [max. 50 char]
-
Required: false
-
Purpose: Sets the AccountingCode for the Tax Type.
-
-
UsesExternalSystem
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the UsesExternalSystem for the TaxType.
-
Return Value
Action Accepted
Data:
{
"ActionType": <string>,
"Id": <Guid>,
"ErrorMsgs": <Array>
[
{
"Entity": <string>,
"Message": <string>,
"Details": <string>
},
...
]
}
-
ActionType: ‘Insert’ or ‘Update’
-
Id: Guid for the new Tax Type.
-
ErrorMsgs: Fields that have issues.
-
Entity: Name of the field.
-
Message: Error message.
-
Details: Additional information about the error.
Action Rejected
"Data": <Array>
- Data: Error message.
Find Tax Types
URI
api/v1/jobs/TaxTypes/FindTaxTypes
Supported Verbs
- GET: return a filtered list of tax types. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/jobs/TaxTypes/FindTaxTypes?page=1
-
Optional Parameters
-
Name:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return tax types with Name containing the string
-
Example Usage:
api/v1/jobs/TaxTypes/FindTaxTypes?page=1&Name=Foo
-
-
AccountingCode:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return tax types with AccountingCode containing the string
-
Example Usage:
api/v1/jobs/TaxTypes/FindTaxTypes?page=1&AccountingCode=123
-
-
ExternalSystemCode:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return tax types with ExternalSystemCode containing the string
-
Example Usage:
api/v1/jobs/TaxTypes/FindTaxTypes?page=1&ExternalSystemCode=123
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>,
"AccountingCode": <string>,
"UsesExternalSystem": <boolean>
},
...
]
}
}
Action Rejected
"Data": <Array>
- Data: Error message.
Transaction
Transaction Counts by Division
URI
api/v1/jobs/transactions/TransactionCountsByDivision
Supported Verbs
- GET: return a list of Division Id’s and their count of submitted transactions
Required Parameters
- None
Optional Parameters
-
posted:
-
Data Type: Boolean
-
Parameter Type: query string
-
Default Value: true
-
Purpose: When true, transactions with a posted date will be counted.
-
Example Usage:
api/v1/jobs/transactions/TransactionCountsByDivision?posted=true&unposted=false
-
-
unposted:
-
Data Type: Boolean
-
Parameter Type: query string
-
Default Value: true
-
Purpose: When true, transactions with no posted date will be counted.
-
Example Usage:
api/v1/jobs/transactions/TransactionCountsByDivision?unposted=true&posted=false
-
-
ar
-
Data Type: Boolean
-
Parameter Type: query string
-
Default Value: true
-
Purpose: When true, transactions with a Transaction Type that is marked as Accounts Receivable will be counted.
-
Example Usage:
api/v1/jobs/transactions/TransactionCountsByDivision?ar=true
-
-
ap
-
Data Type: Boolean
-
Parameter Type: query string
-
Default Value: true
-
Purpose: When true, transactions with a Transaction Type that is marked as Accounts Payable will be counted.
-
Example Usage:
api/v1/jobs/transactions/TransactionCountsByDivision?ap=true
-
Return Value
With no results
{
"Data":
{
"DivisionCounts": []
}
}
With results
{
"Data":
{
"DivisionCounts": <Array>
[
{
"DivisionId": <GUID>,
"TransactionCount": <integer>
}
]
}
}
Set Posted
URI
api/v1/jobs/Transactions/SetPosted
Supported Verbs
- POST: write posted date and external transaction number to submitted transactions. Moreover, add external comment to both submitted and approved transactions.
Required Parameters
-
model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies the transactions that will be modified, along with the desired posted dates, external transaction numbers, and external comments. For approved transactions, only comments can be added; their posted dates or external transaction numbers cannot be modified.
-
Data Model
model
{
"Assignments": <Array>
[
{
"TransactionId": <GUID>,
"PostedDate": <date>,
"ExternalTransactionNumber": <string>
"ExternalComment": <string>
},
....
]
}
- Assignments: an Array of JSON Objects
- TransactionId: A GUID that uniquely identifies the Transaction
- ExternalTransactionNumber: Optional. The transaction number from the external system. If this property is not set then it means no change should be made to the ExternalTransactionNumber.
- PostedDate: Optional. A Date value that will be written to the Transaction's Posted field.
- ExternalComment: Optional. Allows external system to send message back to Helm CONNECT if there is any error or comment related to the transaction. ExternalComment will be saved as an invoice note on the invoice being posted.
Example
{
"Assignments":
[
{
"TransactionId": "e0adc10c-e0d6-11e5-829b-b8ca3ad26410",
"PostedDate": "2016-03-10T12:39:31-08:00"
},
{
"TransactionId": "e0adc10d-e0d6-11e5-829b-b8ca3ad26410",
"ExternalTransactionNumber": "Transaction # 123",
"PostedDate": "2016-03-10T12:39:31-08:00"
"ExternalComment": "Error code: 123"
},
{
"TransactionId": "5a8fb8ee-91f5-11e9-b64e-24fd52356f6b",
"ExternalComment": "Error code: 456"
}
....
]
}
Return Value
- None.
Details
URI
api/v1/jobs/Transactions/Details
Supported Verbs
- GET: return a list Transaction details. This includes Transaction, Transaction Line, and Revenue Allocation data. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/Jobs/Transactions/Details?page=2
-
Optional Parameters
-
divisionId:
-
Data Type: GUID
-
Parameter Type: query string
-
Default Value: null
-
Purpose: Controls division filtering for the results. Only details with a division that has
Id == divisionId
, or with a child of the said division, will be returned in the result. -
Example Usage:
api/v1/Jobs/Transactions/Details?page=1&divisionId=28e9ffee-e583-11e5-829b-b8ca3ad26410
-
-
posted:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: true
-
Purpose: When false, transactions with a posted date will not be counted and returned.
-
Example Usage:
api/v1/Jobs/Transactions/Details?page=1&posted=false
-
-
unposted:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: true
-
Purpose: When false, submitted transactions without a posted date will not be counted and returned.
-
Example Usage
api/v1/Jobs/Transactions/Details?page=1&unposted=false
-
-
approved
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: when true, transactions with an approved date, but not yet submitted nor posted will be counted and returned.
-
Example Usage
// Only approved, but not yet submitted nor posted transactions will be returned api/v1/Jobs/Transactions/Details?page=1&approved=true&unposted=false&posted=false // Both approved, and submitted transactions will be returned api/v1/Jobs/Transactions/Details?page=1&approved=true&posted=false // Both approved, and posted transactions will be returned api/v1/Jobs/Transactions/Details?page=1&approved=true&unposted=false // All approved, submitted and posted transactions will be returned api/v1/Jobs/Transactions/Details?page=1&approved=true
-
-
ar
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: true
-
Purpose: When false, transactions with a Transaction Type that is marked as Accounts Receivable will not be counted and returned.
-
Example Usage:
api/v1/Jobs/Transactions/Details?page=1&ar=false
-
-
ap
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: true
-
Purpose: When false, transactions with a Transaction Type that is marked as Accounts Payable will not be counted and returned.
-
Example Usage:
api/v1/Jobs/Transactions/Details?page=1&ap=false
-
-
includeChargeJson
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, transaction line objects will include the ChargeJson field. It’s recommended this parameter is set to false unless required as the ChargeJson field may contain a large amount of data.
-
Example Usage:
api/v1/Jobs/Transactions/Details?page=1&includeChargeJson=true
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": [ ]
}
}
With Results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"ParentTransactionId": <GUID>,
"ReversedTransactionId": <GUID>,
"OriginalTransactionId": <GUID>,
"GroupId": <GUID>,
"TransactionNumber": <string>,
"OrderNumbers": <string>,
"TransactionDate": <date>,
"DueDate": <date>,
"DivisionName": <string>,
"DivisionShortName": <string>,
"DivisionAccountingCode": <string>,
"AccountName": <string>,
"AccountNumber": <string>,
"CompanyName": <string>,
"CompanyShortName": <string>,
"Note": <string>,
"IsAR": <boolean>,
"IsAP": <boolean>,
"IsInvoice": <boolean>,
"AccountingTerm":
{
"Name": <string>,
"NumberOfDays": <integer>,
"ExternalSystemCode": <string>
},
"Area":
{
"Name": <string>,
"ShortName": <string>,
"ExternalSystemCode": <string>
},
"Order":
{
"OrderNumber": <string>,
"ShipName": <string>,
"CustomerAccount": <string>,
"CustomerPONumber": <string>,
"BillToAddressExternalSystemCode": <string>,
"VoyageNumber": <string>,
"AgentAccountName": <string>,
"AgentAccountNumber": <string>,
"Trips": <Array>
[
{
"StartDate": <date>,
"EndDate": <date>
}
]
},
"CurrencyType":
{
"Id": <GUID>,
"Name": <string>,
"ShortName": <string>,
"Symbol": <string>,
"ExternalSystemCode": <string>
},
"TransactionType":
{
"Id": <GUID>,
"Name": <string>
},
"TransactionLines": <Array>
[
{
"Id": <GUID>,
"Rate": <decimal>,
"Quantity": <decimal>,
"Amount": <decimal>,
"DetailDescription": <string>,
"ChargeJson": <string>,
"RevenueAllocations": <Array>
[
{
"Id": <GUID>,
"ReferenceTransactionLineId": <GUID>,
"Debit": <decimal>,
"Credit": <decimal>,
"DivisionId": <GUID>,
"AccountingCodes": <Array>
[
{
"Id": <GUID>,
"AccountingCode": <string>,
"EntityName": <string>,
"ReferenceType": <string>
}
]
}
]
}
]
}
]
}
}
Trip
Create Trip
URI
api/v1/jobs/trips/CreateTrip
Supported Verbs
- POST: insert a Trip and any associated Jobs.
Required Parameters
-
Trip Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies the Trip information and Job(s) information to be created.
-
Optional Parameters
-
asRequest
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, instead of creating a Trip directly, a Request for those changes will be created.
-
Example Usage:
api/v1/jobs/trips/CreateTrip?asRequest=true
-
Data Model
Trip Model
{
"Order":
{
"Id": <GUID>,
"OrderNumber": <string>
},
"TripType":
{
"Id": <GUID>,
"Name": <string>
},
"FromLocation":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"ToLocation":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Status": <string>,
"RequestedDate": <date>,
"StartDate": <date>,
"EndDate": <date>,
"IsRequestedDateFirm": <boolean>,
"EstimatedDuration": <decimal>,
"NumberRequiredResources": <int>,
"CancelledDate": <datetime>,
"IsNoCharge": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"Jobs": <Array>
[
<JobModel>,
....
]
}
Job Model
{
"RequiredResourceType":
{
"Id": <GUID>,
"Name": <string>
},
"Resource": {
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Acknowledged": <boolean>,
"RunningTo": <decimal>,
"StartDate": <date>,
"EndDate": <date>,
"PlannedStartDate": <date>,
"PlannedEndDate": <date>,
"RunningFrom": <decimal>,
"CancelledDate": <date>,
"IsNoCharge": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
}
Trip Object Fields
-
Order
-
DataType: JSON Object
-
Required: true
-
Purpose: Identify which Order to add the Trip to.
-
Fields:
-
Id
<GUID>
-
OrderNumber
<string>
-
-
-
TripType
-
DataType: JSON Object
-
Required: true
-
Purpose: Sets the TripTypeId of the Trip.
-
Function: Selects the TripType that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
-
-
FromLocation
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the FromLocationId of the Trip.
-
Function: Selects the FromLocation that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<String>
-
ExternalSystemCode
<string>
-
-
ToLocation
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the ToLocationId of the Trip.
-
Function: Selects the ToLocation that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<String>
-
ExternalSystemCode
<string>
-
-
Status
-
DataType: string
-
Required: false
-
Purpose: Sets the Status of the Trip.
-
Note: Status can be one of the following values and is case sensitive:
-
Null: will mark this Trip as unconfirmed
-
“STATUS_COMPLETE”: will mark this Trip as complete
-
“STATUS_CONFIRMED”: will mark this Trip as confirmed
-
“STATUS_CANCELLED”: will mark this Trip as cancelled
-
-
RequestedDate
-
DataType: date
-
Required: false
-
Purpose: Sets the RequestedDate of the Trip.
-
-
IsRequestedDateFirm
-
DataType: boolean
-
Required: false
-
Purpose: Sets the IsRequestedDateFirm of the Trip.
-
-
EstimatedDuration
-
DataType: decimal
-
Required: false
-
Purpose: Sets the Duration of the Trip.
-
Note: This value is stored in minutes.
-
-
StartDate
-
DataType: date
-
Required: false
-
Purpose: Sets the StartDate of the Trip.
-
-
EndDate
-
DataType: date
-
Required: false
-
Purpose: Sets the EndDate of the Trip.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Trip.
-
-
NumberRequiredResources
-
DataType: Int
-
Required: false
-
Purpose: Create specified number of Jobs if the Jobs field (see below) is not specified
-
Note: Jobs will have default resource type if client only has one root resource type. Jobs’ startDate and endDate will default to Trip’s startDate and EndDate. Job’s RunningFrom and RunningTo will be defaulted based on the From and To Location.
-
-
CancelledDate
-
DataType: date
-
Required: false
-
Purpose: Sets the CancelledDate of the Trip.
-
Note: CancelledDate can only be set on a Trip with a status of “STATUS_CANCELLED”.
-
-
IsNoCharge
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the IsNoCharge status of the Trip.
-
-
Jobs
-
DataType: an Array of JSON Objects
-
Required: false
-
Purpose: Create Jobs on the Trip
-
Job Object Fields
-
RequiredResourceType
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the RequiredResourceTypeId of the Job.
-
Function: Selects the RequiredResourceType that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
-
-
Resource
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the ResourceId of the Job.
-
Function: Selects the ResourceId of the resource that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
ExternalSystemCode
<string>
-
-
-
Acknowledged
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the Acknowledged value of the Job.
-
-
RunningTo
-
DataType: decimal
-
Required: false
-
Purpose: Sets the RunningTo time of the of the Job (in minutes).
-
-
StartDate
-
DataType: date
-
Required: false
-
Purpose: Sets the StartDate of the Job.
-
-
EndDate
-
DataType: date
-
Required: false
-
Purpose: Sets the EndDate of the Job.
-
-
PlannedStartDate
-
DataType: date
-
Required: false
-
Purpose: Sets the PlannedStartDate of the Job.
-
-
PlannedEndDate
-
DataType: date
-
Required: false
-
Purpose: Sets the PlannedEndDate of the Job.
-
-
RunningFrom
-
DataType: decimal
-
Required: false
-
Purpose: Sets the RunningFrom time of the of the Job (in minutes).
-
-
CancelledDate
-
DataType: date
-
Required: false
-
Default Value: false
-
Purpose: Sets the CancelledDate of the Job.
-
-
IsNoCharge
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the IsNoCharge status of the Job.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Job.
-
Return Value
With no results
{
"Data":
{
"LogMessages": <Array>
[
{
"Message": <string>,
"Entity": <string>,
"Details": <string>
},
....
]
}
}
With results
{
"Data":
{
"TripId": <GUID>,
"LogMessages": <Array>
[
{
"Message": <string>,
"Entity": <string>,
"Details": <string>
},
....
]
}
}
Update Trip
URI
api/v1/jobs/trips/UpdateTrip
Supported Verbs
- POST: update specified Trip. Only Non-Invoiced trips can be updated
Required Parameters
-
Trip Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies Trip Model to be updated.
-
Optional Parameters
-
asRequest
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, instead of updating a Trip directly, a Request for those changes will be created.
-
Example Usage:
api/v1/jobs/trips/UpdateTrip?asRequest=true
-
Data Model
Trip Model
{
"Id": <GUID>,
"TripType":
{
"Id": <GUID>,
"Name": <string>
},
"FromLocation":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"ToLocation":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Status": <string>,
"RequestedDate": <date>,
"StartDate": <date>,
"EndDate": <date>,
"IsRequestedDateFirm": <boolean>,
"EstimatedDuration": <decimal>,
"NumberRequiredResources": <int>,
"CancelledDate": <date>,
"IsNoCharge": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"Jobs": <Array>
[
<JobModel>,
....
]
}
Job Model
{
"Id": <GUID>,
"RequiredResourceType":
{
"Id": <GUID>,
"Name": <string>
},
"Resource": {
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Acknowledged": <boolean>,
"RunningTo": <decimal>,
"StartDate": <date>,
"EndDate": <date>,
"PlannedStartDate": <date>,
"PlannedEndDate": <date>,
"RunningFrom": <decimal>,
"CancelledDate": <date>,
"IsNoCharge": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Trip Object Fields
-
Id
-
DataType: GUID
-
Required: true
-
Purpose: Identify which Trip should be updated
-
-
TripType
-
DataType: JSON Object
-
Required: true
-
Purpose: Sets the TripTypeId of the Trip.
-
Function: Selects the TripType that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
-
-
FromLocation
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the FromLocationId of the Trip.
-
Function: Selects the FromLocation that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<String>
-
ExternalSystemCode
<string>
-
-
-
ToLocation
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the ToLocationId of the Trip.
-
Function: Selects the ToLocation that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<String>
-
ExternalSystemCode
<string>
-
-
-
Status
-
DataType: string
-
Required: false
-
Purpose: Sets the Status of the Trip.
-
Note: Status can be one of the following values and is case sensitive:
-
Null: will mark this Trip as unconfirmed
-
**"**STATUS_COMPLETE": will mark this Trip as complete
-
“STATUS_CONFIRMED”: will mark this Trip as confirmed
-
“STATUS_CANCELLED”: will mark this Trip as cancelled
-
-
-
RequestedDate
-
DataType: date
-
Required: false
-
Purpose: Sets the RequestedDate of the Trip.
-
-
IsRequestedDateFirm
-
DataType: boolean
-
Required: false
-
Purpose: Sets the IsRequestedDateFirm of the Trip.
-
-
EstimatedDuration
-
DataType: decimal
-
Required: false
-
Purpose: Sets the Duration of the Trip.
-
Note: This value is stored in minutes.
-
-
StartDate
-
DataType: date
-
Required: false
-
Purpose: Sets the StartDate of the Trip.
-
-
EndDate
-
DataType: date
-
Required: false
-
Purpose: Sets the EndDate of the Trip.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Trip.
-
-
NumberRequiredResources
-
DataType: Int
-
Required: false
-
Purpose: Create number of Jobs
-
Note: Jobs will have default resource type if client only has one root resource type. Jobs’ startDate and endDate will default to Trip’s startDate and EndDate. Job’s RunningFrom and RunningTo will be defaulted based on the From and To Location.
-
-
CancelledDate
-
DataType: date
-
Required: false
-
Default Value: false
-
Purpose: Sets the CancelledDate of the Trip.
-
Note: CancelledDate can only be set on a trip with a status of “STATUS_CANCELLED”.
-
-
IsNoCharge
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the IsNoCharge status of the Trip.
-
-
Jobs
-
DataType: an Array of JSON Objects
-
Required: false
-
Purpose: Create Jobs on the Trip
-
Job Object Fields
-
Id
-
DataType: GUID
-
Required: false
-
Purpose: If not NULL, the specified job will be updated
-
-
RequiredResourceType
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the RequiredResourceTypeId of the Job.
-
Function: Selects the RequiredResourceType that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
-
-
Resource
-
DataType: JSON Object
-
Required: false
-
Purpose: Sets the ResourceId of the Job.
-
Function: Selects the ResourceId of the resource that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
-
ExternalSystemCode
<string>
-
-
-
Acknowledged
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the Acknowledged value of the Job.
-
-
RunningTo
-
DataType: decimal
-
Required: false
-
Purpose: Sets the RunningTo time of the of the Job (in minutes).
-
-
StartDate
-
DataType: date
-
Required: false
-
Purpose: Sets the StartDate of the Job.
-
-
EndDate
-
DataType: date
-
Required: false
-
Purpose: Sets the EndDate of the Job.
-
-
PlannedStartDate
-
DataType: date
-
Required: false
-
Purpose: Sets the PlannedStartDate of the Job.
-
-
PlannedEndDate
-
DataType: date
-
Required: false
-
Purpose: Sets the PlannedEndDate of the Job.
-
-
RunningFrom
-
DataType: decimal
-
Required: false
-
Purpose: Sets the RunningFrom time of the of the Job (in minutes).
-
-
CancelledDate
-
DataType: date
-
Required: false
-
Default Value: false
-
Purpose: Sets the CancelledDate of the Job.
-
-
IsNoCharge
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the IsNoCharge status of the Job.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Job.
-
Return Value
With no results
{
"Data":
{
"LogMessages": <Array>
[
{
"Message": <string>,
"Entity": <string>,
"Details": <string>
},
....
]
}
}
With results
{
"Data":
{
"TripId": <GUID>,
"LogMessages": <Array>
[
{
"Message": <string>,
"Entity": <string>,
"Details": <string>
},
....
]
}
}
Find Trips
URI
api/v1/jobs/trips/FindTrips
Supported Verbs
- GET: return a filtered list of Trips and their Jobs. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/jobs/trips/FindTrips?page=2
-
Optional Parameters
-
TripNumber:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Trips that have this TripNumber.
-
Example Usage:
api/v1/jobs/trips/FindTrips?page=1&TripNumber=12.3
-
-
TripId:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Trips that have this TripId.
-
Example Usage:
api/v1/jobs/trips/FindTrips?page=1&TripId=c5e69784-24c5-11e7-82c5-f01faf32a6aa
-
-
TripTypeId:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Trips that have a trip type specified by the TripTypeId.
-
Example Usage:
api/v1/jobs/trips/FindTrips?page=1&TripTypeId=30e42a18-96c3-11e8-8133-0ad2f5f25416
-
-
OrderNumber:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Trips that have this OrderNumber.
-
Example Usage:
api/v1/jobs/trips/FindTrips?page=1&OrderNUmber=12
-
-
OrderId:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Trips that have this OrderId.
-
Example Usage:
api/v1/jobs/trips/FindTrips?page=1&OrderId=c5e69784-24c5-11e7-82c5-f01faf32a6aa
-
-
FromDate:
-
Data Type: date
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Trips where the EndDate (or RequestedDate if EndDate is blank) is >= FromDate
-
Example Usage:
api/v1/jobs/trips/FindTrips?page=1&FromDate=2016-03-10T14:23:00-08:00
-
-
ToDate:
-
Data Type: date
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Trips where the StartDate (or RequestedDate if StartDate is blank) is <= ToDate.
-
Example Usage
api/v1/jobs/trips/FindTrips?page=1&ToDate=2016-03-10T14:23:00-08:00
-
-
ChangedSince:
-
Data Type: date
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Trips that have been created or modified since the date.
-
Example Usage
api/v1/jobs/trips/FindTrips?page=1&ChangedSince=2016-03-10T14:23:00-08:00
-
-
IncludeRequests:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, requested Trips will also be returned
-
Example Usage
api/v1/jobs/trips/FindTrips?page=1&includeRequests=true
-
-
ExcludeNonRequests:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When true, only requested Trips will be returned
-
Example Usage
api/v1/jobs/trips/FindTrips?page=1&includeRequests=true&excludeNonRequests=true
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"OrderId": <GUID>,
"TripNumber": <string>,
"StartDate": <date>,
"EndDate": <date>,
"RequestedDate": <date>,
"IsRequestedDateFirm": <boolean>,
"EstimatedDuration": <decimal>,
"Status": <string>,
"IsRequest": <boolean>,
"OriginalTripId": <GUID>,
"CancelledDate": <datetime>,
"IsNoCharge": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"Triptype":
{
"Id": <GUID>,
"Name": <string>
},
"FromLocation":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"ToLocation":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Jobs" : <Array>
[
{
"Id": <GUID>,
"TripId": <GUID>,
"JobNumber": <string>,
"RequiredResourceType":
{
"Id": <GUID>,
"Name": <string>
},
"Resource": {
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"Acknowledged": <boolean>,
"RunningTo": <decimal>,
"RunningFrom": <decimal>,
"StartDate": <date>,
"EndDate": <date>,
"PlannedStartDate": <date>,
"PlannedEndDate": <date>,
"CancelledDate": <date>,
"IsNoCharge": <boolean>,
"IsRequest": <boolean>
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
},
....
]
},
....
]
}
Archive Trip
URI
api/v1/jobs/trips/ArchiveTrip
Supported Verbs
- POST: Archive a Trip.
Required Parameters
-
Archive Trip Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Trip Id to be archived.
-
Data Model
Archive Trip Model
{
"Id": <Guid>
}
Archive Trip Object Fields
-
Id
-
DataType: Guid
-
Required: true
-
Purpose: Archives the uniquely matching Trip
-
Return Value
Action Accepted
{
"ActionType": "Archive",
"Id": <GUID>
}
-
ActionType: Will always be ‘Archive’.
-
Id: Guid for the Trip.
Action Rejected
"Data": <Array>
- Data: Error Message
Trip Types
URI
api/v2/public/TripTypes
Supported Verbs
GET
- Find Trip Types.
Data Models
Trip Type Model
{
"Id": <GUID>,
"Name": <string>,
"AccountingCode": <string>,
"IsVesselCall": <boolean>,
"ColorCode": <string>,
"PrimaryActivityType": {
"Id": <GUID>,
"Name": <string>
}
}
Trip Type Fields
-
Id
-
DataType: Guid
-
Purpose: To uniquely identify a trip type.
-
-
Name
-
DataType: string [max. 200 char]
-
Filterable: True
-
Purpose: Specifies the name of a trip type.
-
-
AccountingCode
-
DataType: string [max. 50 char]
-
Filterable: True
-
Purpose: Specifies the accounting code of a trip type.
-
-
IsVesselCall
-
DataType: boolean
-
Filterable: True
-
Purpose: Specifies whether the trip type has its vessel call flag set.
-
-
ColorCode
-
DataType: string [max. 7 char]
-
Filterable: False
-
Purpose: Specifies the color hex code of the time bar representing the trip in the planner.
-
-
PrimaryActivityType
-
DataType: object
-
Required: false
-
Purpose: Specifies the primary activity type of the trip type.
-
Fields:
- Id
<GUID>
: optional - Name
<string>
: optional
- Id
-
Error Model
{
"ErrorCode": <integer>,
"ErrorMessage": <string>
}
Error Model Fields
-
ErrorCode
-
DataType: integer
-
Purpose: An integer that uniquely identifies this type of error.
-
-
ErrorMessage
-
DataType: string
-
Purpose: A message which describes what the error means.
-
Find Trip Type
URI
GET api/v2/public/TripTypes
or
GET api/v2/public/TripTypes/{Id}
Example Usage
// Get a paginated response of all trip types
GET api/v2/public/TripTypes
// Get a specific trip type by Id
GET api/v2/public/TripTypes/d21d73fb-bb69-11e8-8102-00155d040945
Required Parameters
- None
Optional Parameters
-
page
:-
Data Type: integer
-
Parameter Type: query string
-
Default Value: 1
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
GET api/v2/public/TripTypes?page=2
-
-
$filter
:-
Data Type: string
-
Parameter Type: query string
-
Default Value: empty
-
Purpose: Controls filtering the returned data. See fields that have “Filterable: true”.
-
Example Usage:
// Get Trip Types with Name equal to "Docking" GET api/v2/public/TripTypes?$filter=Name eq 'Docking' // Get Trip Types with AccountingCode equal to "123456" GET api/v2/public/tripTypes?$filter=AccountingCode eq '123456'
-
Required Permissions
One or both of the following:
- Setup > Jobs > Orders > Trip Types > Basic
- Setup > Jobs > Orders > Trip Types > Configurable
Trip Type Template
URI
api/v2/public/TripTypeTemplates
Supported Verbs
GET
- Find Trip Type Templates.
Data Models
Trip Type Template Model
{
"Id": <GUID>,
"Division": <Object> {
"Id": <GUID>,
"Name": <string>
},
"TripTypeId": <GUID>,
"TripTypeTemplateFields": <Object> {
"ActivityTypes":
[
{
"TypeId": <GUID>,
"SortOrder": <integer>
},
...
],
"EventTypes":
[
{
"TypeId": <GUID>,
"SortOrder": <integer>
},
...
]
}
}
Trip Type Template Fields
-
Id
-
DataType: Guid
-
Purpose: To uniquely identify a trip type template and to specify which trip type template to apply an operation to.
-
-
TripTypeId
-
DataType: Guid
-
Filterable: True
-
Purpose: Specifies the trip type the template applies to.
-
-
Division
-
DataType: Object
-
Purpose: The division this trip type template applies to.
-
Fields:
- Id
<GUID>
- Name
<string>
- Id
-
-
TripTypeTemplateFields
-
DataType: Object
-
Purpose: The lists of activity and event types that make up this trip type template.
-
Fields:
- ActivityTypes
<Array>
: list of activity types- TypeId
<GUID>
: Uniquely identifies the activity type - SortOrder
<integer>
: The order this activity type appears in the combined list of activity and event types.
- TypeId
- EventTypes
<Array>
: list of event types- TypeId
<GUID>
: Uniquely identifies the event type - SortOrder
<integer>
: The order this event type appears in the combined list of activity and event types.
- TypeId
- ActivityTypes
-
Error Model
{
"ErrorCode": <integer>,
"ErrorMessage": <string>
}
Error Model Fields
-
ErrorCode
-
DataType: integer
-
Purpose: An integer that uniquely identifies this type of error.
-
-
ErrorMessage
-
DataType: string
-
Purpose: A message which describes what the error means.
-
Find Trip Type Templates
URI
GET api/v2/public/TripTypeTemplates
or
GET api/v2/public/TripTypeTemplates/{Id}
Example Usage
// Get a paginated response of all trip type templates
GET api/v2/public/TripTypeTemplates
// Get a specific trip type template by Id
GET api/v2/public/TripTypeTemplates/d21d73fb-bb69-11e8-8102-00155d040945
Required Parameters
- None
Optional Parameters
-
page
:-
Data Type: integer
-
Parameter Type: query string
-
Default Value: 1
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
GET api/v2/public/TripTypeTemplates?page=2
-
-
$filter
:-
Data Type: string
-
Parameter Type: query string
-
Default Value: empty
-
Purpose: Controls filtering the returned data. See fields that have “Filterable: true”.
-
Example Usage:
// Get Trip Type Templates with TripTypeId equal to "4cb25fa3-4b61-11e9-9d1b-f01faf02f2e9" GET api/v2/public/TripTypeTemplates?$filter=TripTypeId eq (guid'4cb25fa3-4b61-11e9-9d1b-f01faf02f2e9')
-
Required Permissions
- Setup > Jobs > Orders > TripTypes > Configurable
Return Value
Action Accepted
Returns an array containing the requested Trip Type Templates in the format of the Trip Type Template Model.
{
"Page": <integer>,
"Next": <URI>,
"Results": <Array of Trip Type Template Model>
}
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
User
Create/Update User
URI
api/v1/jobs/users/CreateOrUpdateUser
Supported Verbs
- POST: insert or update a user.
Required Parameters
-
User Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one User Model to be created or updated.
-
Data Model
User Model
{
"Id": <GUID>,
"FirstName": <string>,
"MiddleName": <string>,
"LastName": <string>,
"Suffix": <string>,
"PreferredName": <string>,
"LdapName": <string>,
"Email": <string>,
"EmployeeNumber": <string>,
"HomePhoneNumber": <string>,
"CellPhoneNumber": <string>,
"Birthday": <date>,
"CanLogIn": <boolean>,
"CanLogInToBoat": <boolean>,
"IsActiveEmployee": <boolean>,
"Division":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"SecondaryDivisions":
[
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
....
]
"Roles":
[
{
"Id": <GUID>,
"Name": <string>
},
....
]
"Positions":
[
{
"Id": <GUID>,
"Name": <string>,
"EffectivePositions":
[
{
"Id": <GUID>,
"HireDate": <date>,
"TerminateDate": <date>
},
....
]
},
....
]
"Department":
{
"Id": <GUID>,
"Name": <string>
},
"RotationType":
{
"Id": <GUID>,
"Name": <string>
},
"PayrollGroup":
{
"Id": <GUID>,
"Name": <string>
},
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"PayrollClassHistory":
{
"Upsert":
[
{
"Id": <GUID>,
"PayrollClass": {
"Id": <GUID>,
"Name": <string>
},
"EffectiveDate": <date>
},
...
],
"Delete": [
<GUID>,
...
]
}
}
User Object Fields
-
Id
-
DataType: GUID
-
Required: true when updating
-
Purpose: Identify the user to update
-
-
FirstName
-
DataType: string [max. 200 char]
-
Required: true
-
Purpose: Sets the FirstName for the User.
-
-
MiddleName
-
DataType: string [max. 200 char]
-
Required: false
-
Purpose: Sets the MiddleName for the User.
-
-
LastName
-
DataType: string [max. 200 char]
-
Required: true
-
Purpose: Sets the LastName for the User.
-
-
Suffix
-
DataType: string [max. 100 char]
-
Required: false
-
Purpose: Sets the Suffix for the User.
-
-
PreferredName
-
DataType: string [max. 200 char]
-
Required: false
-
Purpose: Sets the PreferredName for the User.
-
-
LdapName
-
DataType: string [max. 200 char]
-
Required: false
-
Purpose: Sets the Ldap for the User.
-
-
Email
-
DataType: string [max. 200 char]
-
Required: false
-
Purpose: Sets the Email for the User.
-
-
EmployeeNumber
-
DataType: string [max. 100 char]
-
Required: false
-
Purpose: Sets the EmployeeNumber for the User.
-
-
CanLogIn
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the CanlogIn Flag for the User.
-
-
CanLogInToBoat
-
DataType: string
-
Required: false
-
Default Value: false
-
Purpose: Sets the CanLogInToBoat for the User.
-
-
IsActiveEmployee
-
DataType: boolean
-
Required: false
-
Default Value: false
-
Purpose: Sets the ActiveEmployee for the User.
-
-
Division
-
DataType: JSON Object
-
Required: true
-
Purpose: Sets the Division for the User.
-
Function: Selects the Division that uniquely matches one or more of the given fields.
-
Fields:
-
Id
<GUID>
-
Name
<string>
[max. 200 char] -
ExternalSystemCode
<string>
-
-
-
SecondaryDivisions
-
DataType: array of JSON Division Objects
-
Required: false
-
Purpose: Sets the SecondaryDivision for the User.
-
-
Roles
-
DataType: array of JSON Role Objects
-
Required: false
-
Purpose: Sets the Roles for the User.
-
Fields:
-
Id
<GUID>
-
Name
<string>
[max. 200 char]
-
-
-
Positions
-
DataType: array of JSON Position Object
-
Required: false
-
Purpose: Sets the Positions for the User.
-
Fields:
-
Id
<GUID>
-
Name
<string>
[max. 400 char] -
EffectivePositions
-
DataType: Array of JSON Objects
-
Required: false
-
Purpose: update HireDate and TerminateDate for Positions
-
Fields:
-
Id
-
DataType:
<GUID>
-
Required: true when updating
-
Purpose: Identify the effectivePosition record to update
-
Note: Can’t use Id from another user
-
-
HireDate
-
DataType:
<date>
-
Required: false
-
Purpose: set the HireDate for effectivePosition
-
-
TerminateDate
-
DataType:
<date>
-
Required: false
-
Purpose: set the TerminateDate for effectivePosition
-
-
-
Note: HireDates and TerminateDates for same position can’t overlap.
-
-
-
Note: Same position can only be given once. When updating, need to provide all effectivePositions with Id. Missing effectivePositions will be deleted.
-
-
Departments
-
DataType: Json Object
-
Required: false
-
Purpose: Sets the Department for the User.
-
Fields:
-
Id
<GUID>
-
Name
<string>
[max. 400 char]
-
-
-
PayrollClassHistory
-
DataType: Json Object
-
Required: false
-
Purpose: Sets the PayrollClassHistory for the User.
-
Fields:
-
Upsert
-
DataType: Array of JSON Objects
-
Required: false
-
Purpose: Insert or update PayrollClasses for PayrollClassHistory
-
Fields:
-
Id
-
DataType:
<GUID>
-
Required: true when updating
-
Purpose: Identify the payrollClassHistory record to update
-
-
PayrollClass
-
DataType:
Json Object
-
Required: true when inserting or updating the field
-
Fields:
-
Id
<GUID>
-
Name
<string>
[max. 200 char]
-
-
-
EffectiveDate
-
DataType:
<date>
-
Required: true when inserting or updating the field
-
-
-
-
Delete
-
DataType: array of
<GUID>
-
Required: false
-
Purpose: Delete PayrollClasses from PayrollClassHistory
-
-
-
Note: This is only available to Helm CONNECT Personnel
-
-
RotationType
-
DataType: Json Object
-
Required: false
-
Purpose: Sets the RotationTypeId for the User.
-
Fields:
-
Id
<GUID>
-
Name
<string>
[max. 200 char]
-
-
Note: This is only available to Helm CONNECT Personnel
-
-
PayrollGroup
-
DataType: Json Object
-
Required: false
-
Purpose: Sets the PayrollGroupId for the User.
-
Fields:
-
Id
<GUID>
-
Name
<string>
[max. 200 char]
-
-
Note: This is only available to Helm Connect Personnel
-
-
HomePhoneNumber
-
DataType: string [max. 50 char]
-
Required: false
-
Purpose: Sets the HomePhoneNumber for the User.
-
-
CellPhoneNumber
-
DataType: string [max. 50 char]
-
Required: false
-
Purpose: Sets the CellPhoneNumber for the User.
-
-
Birthday
-
DataType: date
-
Required: false
-
Purpose: Sets the Birthday for the User.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the User.
-
Return Value
Action Accepted
Data:
{
"ActionType": <string>,
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>,
"Details": <string>
},
....
]
}
-
ActionType: Insert or Update
-
Id: Guid for the new user if ActionType is insert.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
-
Details: Additional information about the error.
Action Rejected
"Data": <Array>
- Data: Error Message
Create/Update User Image
URI
api/v1/jobs/users/CreateOrUpdateUserImage
Supported Verbs
- POST: insert or update a user image.
Required Parameters
-
UserId
-
Data Type: Guid
-
Parameter Type: query string
-
Purpose: Identify which user should get this image
-
Example Usage:
api/v1/jobs/users/CreateOrUpdateUserImage?UserId=446f1bf2-917d-456a-9059-7a42981278f7
-
-
ImageData
-
Data Type: Blob
-
ParameterType: Request Content
-
Purpose: binary format of the image
-
-
FileName
-
Data Type: String
-
Parameter Type: Request Headers
-
Required: true
-
Example:
Content-Disposition: attachment; filename="fileName.pdf"
-
Return Value
Action Accepted
Data:
{
"ActionType": <string>
}
- ActionType: Insert or Update
Action Rejected
"Data": <Array>
- Data: Error Messages
Find Users
URI
api/v1/jobs/users/FindUsers
Supported Verbs
- GET: return a filtered list of users. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/Jobs/Users/FindUsers?page=2
-
Optional Parameters
-
PersonId:
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return the Users with the Person Id matching the provided value
-
Example Usage:
api/v1/Jobs/Users/FindUsers?page=1&PersonId=c3684747-c376-11e9-8250-ec335919b4ac
-
-
FirstName:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Users with First Name containing the string
-
Example Usage:
api/v1/Jobs/Users/FindUsers?page=2&FirstName=Foo
-
-
MiddleName:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Users with Middle Name containing the string
-
Example Usage:
api/v1/Jobs/Users/FindUsers?page=2&MiddleName=boo
-
-
LastName:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Users with Last Name containing the string name
-
Example Usage:
api/v1/Jobs/Users/FindUsers?page=2&LastName=bar
-
-
PreferredName:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return Users with Preferred Name containing the string name
-
Example Usage:
api/v1/Jobs/Users/FindUsers?page=2&PreferredName=Edocian
-
-
EmployeeNumber:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, When not null, will return Users with Employee Number containing the string
-
Example Usage:
api/v1/Jobs/Users/FindUsers?page=2&EmployeeNumber=123
-
-
DivisionId
-
Data Type: Guid
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return User that have this division in either primary division or secodnary divisions.
-
Example Usage:
api/v1/Jobs/Users/FindUsers?page=2&Division=230e6fbb-d304-477a-9a2c-c0d0810f38ff
-
-
CanLogIn:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return users that have CanLogIn match with the input value
-
Example Usage:
api/v1/Jobs/Users/FindUsers?page=2&CanLogIn=true
-
-
CanLoginToBoat:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return users that have CanLogIn match with the input value
-
Example Usage
api/v1/Jobs/Users/FindUsers?page=2&CanLogInToBoat=true
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"FirstName": <string>,
"PreferredName": <string>,
"MiddleName": <string>,
"LastName": <string>,
"Suffix": <string>,
"LdapName": <string>,
"Email": <string>,
"EmployeeNumber": <string>,
"HomePhoneNumber": <string>,
"CellPhoneNumber": <string>,
"Birthday": <date>,
"CanLogIn": <boolean>,
"CanLogInToBoat": <boolean>,
"IsActiveEmployee": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"PayrollClassHistory": <Array>
[
{
"Id": <GUID>,
"PayrollClass":
{
"Id": <GUID>,
"Name": <string>
},
"EffectiveDate": <data>
},
....
],
"RotationType":
{
"Id": <GUID>,
"Name": <string>
},
"PayrollGroup":
{
"Id": <GUID>,
"Name": <string>
},
"Division":
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
"SecondaryDivisions":
[
{
"Id": <GUID>,
"Name": <string>,
"ExternalSystemCode": <string>
},
....
],
"AssignedAsset":
{
"Id": <GUID>,
"Name": <string>
},
"Roles":
[
{
"Id": <GUID>,
"Name": <string>
},
....
],
"Positions":
[
{
"Id": <GUID>,
"Name": <string>,
"EffectivePositions":
[
{
"Id": <GUID>,
"HireDate": <date>,
"TerminateDate": <date>
},
....
]
},
....
],
"Department":
{
"Id": <GUID>,
"Name": <string>
}
},
....
]
}
}
User Defined Fields
- Note: This section describes how to use the User Defined Field endpoint. To find out how to update UDFs on other endpoints, please go here.
URI
api/v2/public/UserDefinedFields
Supported Verbs
-
GET
- Find User Defined Fields.
-
POST
- Create new User Defined Fields.
-
PATCH
- Update existing User Defined Fields.
Data Models
User Defined Field Model
{
"Id": <GUID>,
"Key": <string>,
"Name": <string>,
"EntityType": <string>,
"TypeInfo": {
"Type": <string>,
"Options": [
Option1,
Option2,
...
],
"DataSource": {
"Key": <string>,
"Params": {
"Param1": <string>,
"Param2": <string>,
...
}
}
}
}
UDF Fields
-
Id
-
DataType: Guid
-
Required: False when using POST to create, True when using PATCH to update (unless Id is already specified in the URI).
-
Purpose: To uniquely identify a UDF and to specify which UDF to apply an operation to.
-
-
Key
-
DataType: string [max. 100 char]
-
Required: True when using POST to create, False when using PATCH to update.
-
Filterable: True
-
Purpose: Specifies a unique key for a UDF. Must start with a letter, and contain only letters and numbers (no spaces or other characters). Must also not already exist in the database for the specified entity type (see EntityType below). It is invalid to set this field on a PATCH.
-
-
Name
-
DataType: string [max. 100 char]
-
Required: True when using POST to create, False when using PATCH to update.
-
Filterable: True
-
Purpose: Specifies the name of a UDF.
-
-
EntityType
-
DataType: string [max. 100 char]
-
Required: True when using POST to create, False when using PATCH to update.
-
Filterable: True
-
Purpose: Specifies the entity the UDF will appear on. It is invalid to set this field on a PATCH. Can be any of: ActionItem, Asset, AssetComponent, Contract, Event, Job, JobEvent, Location, Order, Part, Person, Resource, Ship, Trip, TripEvent, or WorkPeriod.
-
-
TypeInfo
-
DataType: JSON Object (See Data Model for details)
-
Required: True when using POST to create, False when using PATCH to update.
-
Filterable: False
-
Purpose: Specifies the behavior of the UDF. It is invalid to set this field on a PATCH.
-
Fields:
-
Type
<string>
: Required - must be one of string, decimal, date, datetime, bool, single_select, or multi_select. -
Options
<array>
: Required if Type is single_select and multi_select, and the DataSource field is not provided. Cannot be used for other types. This is used if the caller wants to create a “custom” data source. Contains an array of strings specifying the options available. -
DataSource
-
DataType: JSON Object (See Data Model for details)
-
Required: True when using POST to create, False when using PATCH to update. Only true when Type is single_select or multi_select and options are not provided.
-
Filterable: False
-
Purpose: Specifies the data source that the UDF gets the items in the drop down from.
-
Fields:
-
Key
<string>
: Required - Must be one of accounts, assets, companies, locations, parts, people, resources, ships, or vendors. Specifies what is shown in the drop down. -
Params
-
DataType: JSON Object (See Data Model for details)
-
Required: False
-
Filterable: False
-
Purpose: Specifies a filter so the drop down displays a subset of the options.
-
Possible Fields:
-
types: Optional - Only works when DataSource is accounts, assets, locations, resources, or ships. Specify (with a GUID or comma separated list of GUIDs) the account types, asset types, location types, resource types, or ship types (depending on data source) that appear in the drop down.
-
departments: Optional - Only works when the DataSource is people. Specify (with a GUID or comma separated list of GUIDs) what departments the people in the drop down must belong to.
-
positions: Optional - Only works when the DataSource is people. Specify (with a GUID or comma separated list of GUIDs) what positions the people in the drop down must belong to.
-
Note: Unlike the other keys, these keys start with a lower case letter, and must be lower case to be recognized. The API call will fail otherwise.
-
-
-
-
-
-
Error Model
{
"ErrorCode": <integer>,
"ErrorMessage": <string>
}
Error Model Fields
-
ErrorCode
-
DataType: integer
-
Purpose: An integer that uniquely identifies this type of error.
-
-
ErrorMessage
-
DataType: string
-
Purpose: A message which describes what the error means.
-
Find User Defined Field
URI
GET api/v2/public/UserDefinedFields
or
GET api/v2/public/UserDefinedFields/{id}
Example Usage
// Get a paginated response of all user defined fields
GET api/v2/public/UserDefinedFields
// Get a specific user defined fields by Id
GET api/v2/public/UserDefinedFields/7fb26edb-95ce-11e8-8132-0a9bbdeb6e3e
Required Parameters
- None
Optional Parameters
-
page
:-
Data Type: integer
-
Parameter Type: query string
-
Default Value: 1
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
GET api/v2/public/UserDefinedFields?page=2
-
-
$filter
:-
Data Type: string
-
Parameter Type: query string
-
Default Value: empty
-
Purpose: Controls filtering the returned data. See fields that have “Filterable: true”.
-
Example Usage:
// Get User Defined Fields with Name equal to "Repair Duration" GET api/v2/public/UserDefinedFields?$filter=Name eq 'Repair Duration' // Get User Defined Fields with Key equal to "RepairDuraton" GET api/v2/public/UserDefinedFields?$filter=Key eq 'RepairDuration'
-
Required Permissions
- Setup > Custom Fields
Return Value
Action Accepted
Returns an array containing the requested User Defined Fields in the format of the User Defined Fields Model.
{
"Page": <integer>,
"Next": <URI>,
"Results": <Array of UDF Model>
}
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Create User Defined Field
URI
POST api/v2/public/UserDefinedFields
Example Usage
// Create one user defined field that accepts a date
POST api/v2/public/UserDefinedFields
{
"Name": "Date Built",
"Key": "DateBuilt",
"EntityType": "Resource",
"TypeInfo": {
"Type": "date"
}
}
// Create a user defined field that holds a single select drop down of ships belonging to two specific resource types.
POST api/v2/public/UserDefinedFields
{
"Name": "Associated Resource",
"Key": "AssocResource",
"EntityType": "Location",
"TypeInfo": {
"Type": "single_select",
"DataSource": {
"Key": "resources",
"Params": {
"types": "473f39b7-5be7-11e9-9315-b808cf84c294,473f39ba-5be7-11e9-9315-b808cf84c294"
}
}
}
}
// Create a user defined field that holds a single select drop down with three options "High", "Medium", "Low"
{
"Name": "Priority Level",
"Key": "PLevel",
"EntityType": "Order",
"TypeInfo": {
"Type": "single_select",
"Options": [
"High",
"Medium",
"Low"
]
}
}
Required Parameters
-
Data Type: User Defined Field Model or Array of User Defined Field Model
-
Parameter Type: request body
-
Purpose: Supplies the User Defined Field(s) to be created.
Required Permissions
- Setup > Custom Fields
Return Value
Action Accepted
Returns an array containing the created User Defined Fields.
<Array of User Defined Field Model>
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Update User Defined Field
URIs
Update a User Defined Field
PATCH api/v2/public/UserDefinedFields/
or
PATCH api/v2/public/UserDefinedFields/{Id}
Required Parameters
-
Id
:-
Data Type: Guid
-
Parameter Type: request path or request body
-
Purpose: To specify which User Defined Field to apply an operation to.
-
Example Usage:
// Change the User Defined Field Name to "PO#" PATCH api/v2/public/UserDefinedFields/c5e69784-24c5-11e7-82c5-f01faf32a6aa { "Name": "PO#" } // Update the Name of multiple user defined fields by providing the Id in the request body PATCH api/v2/public/UserDefinedFields [ { "Id": "c5e69784-24c5-11e7-82c5-f01faf32a6aa", "Name": "Sister Ship" }, { "Id": "d21d73fb-bb69-11e8-8102-00155d040945", "Name": "Home Area" } ]
-
Optional Parameters
-
Name
:-
Data Type: string
-
Parameter Type: string
-
Purpose: To change the name of the UDF.
-
Example Usage:
// Change the User Defined Field Name to "PO#" PATCH api/v2/public/UserDefinedFields/c5e69784-24c5-11e7-82c5-f01faf32a6aa { "Name": "PO#" }
-
Required Permissions
- Setup > Custom Fields
Return Value
Action Accepted
Returns an array containing the modified User Defined Fields.
<Array of User Defined Field Model>
Action Rejected
{
"Errors": <Array of Error Model>
}
- Errors: Collection of Error Model (See Data Models for details)
Vendor
Create/Update Vendor
URI
api/v1/hsqe/vendors/CreateOrUpdateVendor
Supported Verbs
- POST: insert and update one vendor.
Required Parameters
-
Vendor Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies one Vendor Model to be created or updated.
-
Data Model
Vendor Model
{
"Id": <GUID>,
"Name": <string>,
"ShortName": <string>,
"CrossReferenceNumber": <string>,
"IsActive": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details)
}
Vendor Object Fields
-
Id
-
DataType: Guid
-
Required: false when creating new data; true when updating existing data
-
Purpose: update the uniquely matching Vendor.
-
-
Name
-
DataType: string [max. 400 char]
-
Required: true when creating new data; false when updating existing data
-
Purpose: Sets the Name for the Vendor.
-
-
ShortName
-
DataType: string [max. 100 char]
-
Required: false
-
Purpose: Sets the ShortName for the Vendor. Will be set to null if not specified.
-
-
CrossReferenceNumber
-
DataType: string [max. 100 char]
-
Required: false
-
Purpose: Sets the CrossReferenceNumber for the Vendor. Will be set to null if not specified.
-
-
IsActive
-
DataType: boolean
-
Required: false
-
Purpose: Sets whether the Vendor is active. Will be set to true if not specified.
-
-
UserDefined
-
DataType: User Defined Data Model (see User Defined Fields section for more details)
-
Required: false
-
Purpose: Sets the UserDefined for the Vendor. Will be set to null if not specified.
-
Return Value
Action Accepted
Data:
{
"ActionType": <string>,
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>
},
....
]
}
-
ActionType: Insert or Update
-
Id: Guid for the new Vendor if ActionType is insert.
-
ErrorMsgs: Fields that have issues.
-
Entity: name of the Field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message
Find Vendors
URI
api/v1/hsqe/Vendors/FindVendors
Supported Verbs
- GET: return a filtered list of vendors. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 25 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/hsqe/Vendors/FindVendors?page=2
-
Optional Parameters
-
SearchString:
-
Data Type: string
-
Parameter Type: query string
-
Default Value: null
-
Purpose: When not null, will return vendor with Name or ShortName containing the string
-
Example Usage:
api/v1/hsqe/Vendors/FindVendors?page=2&SearchString=Foo
-
-
IncludeInactive:
-
Data Type: boolean
-
Parameter Type: query string
-
Default Value: false
-
Purpose: When false, will return active vendors only. Otherwise, will return inactive vendors as well.
-
Example Usage:
api/v1/hsqe/Vendors/FindVendors?page=2&IncludeInactive=true
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"Id": <GUID>,
"Name": <string>,
"ShortName": <string>,
"CrossReferenceNumber": <string>,
"IsActive": <boolean>,
"UserDefined": User Defined Data Model (see User Defined Fields section for more details),
"Contacts": [
{
"Id": <GUID>,
"Name": <string>,
"Position": <string>,
"Description": <string>,
"PhoneNumbers": <string> (comma separated),
"Emails": <string> (comma separated),
"AddressLine": <string>,
"City": <string>,
"StateProvince": <string>,
"PostalCode": <string>,
"Country": <string>
}, ...
],
"PartContracts": [
{
"Id": <GUID>,
"PartId": <GUID>,
"PartName": <string>,
"PartIsActive": <boolean>,
"PartIsCriticalSpare": <boolean>,
"VendorPartNumber": <string>,
"Price": <decimal>,
"StartDate": <date>,
"EndDate": <date>,
"AdditionalInfo": <string>
}, ...
],
"Archived": <date>
},
...
]
}
}
Certifications
Find Certifications
URI
api/v1/hsqe/certifications/FindCertifications
Supported Verbs
- GET: Return a filtered list of Certification Types and their current and historical Certifications. The data is returned by page (see below).
Required Parameters
-
page:
-
Data Type: integer
-
Parameter Type: query string
-
Purpose: Controls the pagination of the returned data. The value of page is the offset of results to return.
page=1
, would return the first batch of results,page=2
would return the second batch of results, and so on. Each batch contains 100 records except for the last page which will contain less if not enough records exist. -
Example Usage:
api/v1/hsqe/certifications/FindCertifications?page=2
-
-
personId: (required if no assetId given)
-
Data Type: GUID
-
Parameter Type: query string
-
Purpose: Filters the result set to only include Certifications that match the Person with the given personId.
-
Example Usage:
api/v1/hsqe/certifications/FindCertifications?page=2&personId=430e6fbb-d304-477a-9a2c-c0d0810f38ff
-
-
assetId: (required if no personId given)
-
Data Type: GUID
-
Parameter Type: query string
-
Purpose: Filters the result set to only include Certifications that match the Asset with the given assetId.
-
Example Usage:
api/v1/hsqe/certifications/FindCertifications?page=2&assetId=530e6fbb-d304-477a-9a2c-c0d0810f38ff
-
Return Value
With no results
{
"Data":
{
"TotalCount": 0,
"Page": []
}
}
With results
{
"Data":
{
"TotalCount": <integer>,
"Page": <Array>
[
{
"TypeId": <GUID>,
"Type": <string>,
"TargetId": <GUID>,
"Target": <string>,
"PositionId": <GUID>,
"AssetTypeId": <GUID>,
"RequiredToOperate": <boolean>,
"DocumentRequired": <boolean>,
"RequireExpiration": <boolean>,
"Category": <string>,
"CurrentCertification":
{
"Id": <GUID>,
"Obtained": <date>,
"Expires": <date>,
"ReferenceNumber": <string>,
"Updated": <date>,
"Attachments": [
{
"Name": <string>
}, ...
]
},
"HistoricalCertifications": [
{
"Id": <GUID>,
"Obtained": <date>,
"Expires": <date>,
"ReferenceNumber": <string>,
"Updated": <date>,
"Attachments": [
{
"Name": <string>
}, ...
]
}, ...
],
},
...
]
}
}
Create/Update Certification
URI
api/v1/hsqe/certifications/CreateCertification
Supported Verbs
- POST: Insert or update a certification for a Person or Asset.
Required Parameters
-
Certificate Model
-
Data Type: JSON Object (See Data Model for details)
-
Parameter Type: request body
-
Default Value: none
-
Purpose: Supplies Certificate Model to be created or updated.
-
Data Model
Certificate Model
{
"TypeId": <GUID>,
"AssetId": <GUID>,
"PersonId": <GUID>,
"Obtained": <date>,
"Expires": <date>,
"ReferenceNumber": <string>
}
Certification Object Fields
-
TypeId
-
DataType: Guid
-
Required: true
-
Purpose: Sets the Type on the Certificate being inserted.
-
-
AssetId
-
DataType: Guid
-
Required: true, if no PersonId supplied, otherwise false
-
Purpose: Sets the Target for the Certificate.
-
-
PersonId
-
DataType: Guid
-
Required: true, if no AssetId supplied, otherwise false
-
Purpose: Sets the Target for the Certificate.
-
-
Obtained
-
DataType: date
-
Required: true
-
Purpose: Sets the Obtained date for the Certificate.
-
-
Expires
-
DataType: date
-
Required: true, when the Certification Type has RequireExpiration set to true
-
Purpose: Sets the Expires date for the Certificate.
-
-
ReferenceNumber
-
DataType: string
-
Required: false
-
Purpose: Sets the ReferenceNumber for the Certificate.
-
Return Value
Action Accepted
Data:
{
"ActionType": <string>,
"Id": <GUID>,
"ErrorMsgs":
[
{
"Entity": <string>,
"Message": <string>
},
....
]
}
-
ActionType: Insert
-
Id: Guid for the new Certificate.
-
ErrorMsgs: Fields that have issues.
-
Entity: Name of the Field
-
Message: Error message
Action Rejected
"Data": <Array>
- Data: Error Message
Add Certification Attachment
URI
api/v1/hsqe/certifications/AddCertificationAttachment
Supported Verbs
- POST: attach a certification attachment.
Required Parameters
-
CertificationId
-
Data Type: Guid
-
Parameter Type: Query string
-
Purpose: Identify which certification should get this attachment
-
Example Usage:
api/v1/hsqe/certifications/AddCertificationAttachment?certificationId=446f1bf2-917d-456a-9059-7a42981278f7
-
-
Data
-
Data Type: Blob
-
Parameter Type: Request Content
-
Purpose: Binary format of the attachment
-
-
FileName
-
Data Type: String
-
Parameter Type: Request Headers
-
Required: true, when updating, otherwise false
-
Example:
Content-Disposition: attachment; filename="fileName.pdf"
-
Return Value
Action Accepted
Data:
{
"ActionType": "Insert"
}
Action Rejected
"Message": Error Message