Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the UI you can see this list from "My company" > "Prices".

URL

(GET) /api/pricing/companies/master/pricelists

PARAMETERS

URL parameters are:

id

The price list ID

Integer, Mandatory


RESULTS

The result is a JSON object:

...

A node containing details on the current job assignment, see further down.

Example:

...

of same format as described in: 


EXAMPLES

The list of all price lists defined in "My company". These are the price lists that can be assigned to clients.

Code Block
{
    "

...

default": 

...

500,
    "

...

items": 

...

[

...

     

...

 

...

  

...

{
      

...

 

...

     "

...

plid": 

...

500,

...


   

...

 

...

   

...

An array of available actions, see below.

If no action is available to the user, the array is empty.

Example:

...

     "

...

code": "

...

",

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

     "

...

name": "Default"

...

,

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

    "

...

cid": 

...

537,
    

...

        "

...

enabled": true,

...


  

...

 

...

     

...

 

...

   

...

Assignment object

The object has these properties:

mode

0 = fixed assignment mode, 1 = open job proposal, 2 = crowd sourcing mode

int 
modet The name of the mode. Example: "Fixed assignment" string
cid

Null or the ID of the assigned company.

Note that if mode = 1, a job is still a proposal and never assigned yet.

If mode = 2, the job is not assigned neither since multiple people can work at the same time.

int?
cnameNull or the name of the assigned company.string?
uid

Null or the ID of the assigned person. If this value is set then "cid" is set as well.

Note that a job can be assigned to just a company without specifying a specific user. The exception is, of course, if a job is assigned to an in-house worker.

int?
uname

Null or the name of the assigned person.

To get full person details, use: persons/{uid}

string?
wasAccepted

When a job is assigned by a manager, this property is false. It is set to true as soon as the assigned company or person takes action such as: Accept job, Accept job proposal, Change status to In Progress, etc.

This flag is a useful indication for the manager as well as the assigned worker.

bool

Action object

Each element in actions has these properties:

...

True if this item is only there to show some information. No button.

This is for example used when there is no action available to the user and we want to inform the user why there is no action at this point in time.

...

True if this action should be shown prominently. Typically all primary actions should be immediately accessible through buttons and without opening a combo etc.

False if this action is less important and can be hidden in an "Actions" drop down.

...

affectsRights

...

Indicates if applying the action will change the accessibility of the job.

For example, changing the status of a job requires reloading editing access rights with parameter "loadRightsFromCache" = true in the editor initialisation method: resources/segments/view/properties

One of the actions giving "false" for this property is the one to submit a message with the job.

...

A color style for actions. For example, cancellation may be colored "red", job acceptance be colored "green" and so on.

Possible values are:

  • Default - Regular color (black)
  • Green - Actions like for accepting new jobs or completing work
  • Orange - Actions such as refusals
  • Red - Actions such as cancellations
  • Gray - Actions that are less used such as re-assigning to a colleague

...

This defines what you need to show to the user together with the title and description of the action:

  • None - A simple button to run the action
  • Terms - Show terms & conditions (either link to read or also the checkbox - depending on other properties)
  • KeepJobOpen - Control to ask if the current job shall be left open when sending back to previous job
  • AssignWithinCompany - Exposes control to let user choose another person within his/her company
  • WorkCompleted - Check if all work is done (stats, no errors, etc.).

NOTE: If isinfo is true then uicontrol will be

...

If true, a notification will be sent always. The user has no possibility to untick the notify checkbox.

Any unticking will be overridden server side.

...

Uicontrols object

The object has one property per UI control in the list of actions. If there is no action at all, the object is empty (but not null).

...

Contains properties:

  • termsShow: True if you need to render a checkbox to accept terms & conditions + a link to view the terms. If false then this panel is not shown.

To fetch terms & conditions use this API: jobs/{id}/terms/preview (without setting the cid/pid parameters)

...

Always null.

Render a checkbox, unticked by default, and ask the user if the job shall be kept open when sending back work to the preceding job in the workflow.

...

Always null.

Use API to get list of colleagues of the current user.

...

Contains properties:

  • canSkip: If true, the user can complete the job even if the stats are "bad" (QA errors...). True if user has advanced management rights.

To evaluate if the job has problems, use this API method:

jobs/{id}/terms/checklist

If the pass result is false, the job cannot be completed - Unless canSkip above is true.

Users with advanced access rights can override blocking situations:

EXAMPLES

The following example is for a manager user accessing a job which is proposed to him/her. As a manager, the user has management level actions as well.

Code Block
{
  "id": "c231",
  "jobid": 231,
  "iscodyt": true,
  "status": 1,
  "statust": "Not assigned",
  "hasPredecessor": false,
  "assignment": {
    "mode": 0,
    "modet": "Fixed assignment",
    "cid": null,
    "cname": null,
    "uid": null,
    "uname": null,
    "wasAccepted": false
  },
  "readOnly": false,
  "actions": [
	  {
		"id": "OPENING_ACCEPT_INACTIVE",
		"title": "Yes, I want to reserve this upcoming job!",
		"desc": "This job is still inactive but you can already reserve it now. This will put your name on the job.",
		"isinfo": false,
		"isprimary": true,"isDefault": true,
            "isDraft": false,
            "currency": "EUR",
            "currencyt": "Euro",
            "comments": "",
            "contractno": ""
        },
        {
            "plid": 492,
          "affectsRights": true, 		"stylecode": "GreenSpecial",
		"uicontrol": "Terms"
	  },
	  {
		"id": "OPENING_DECLINE",
		"title            "name": "Unfortunately, I have to decline this proposal.Special services",
 		"desc": "This will remove the job opening from your job list.", 		"isinfocid": false537,
		"isprimary": true,            "affectsRightsenabled": true,
		"style": "Gray",
		"uicontrol": "None"
	  },
	  {
		"id": "ADMIN_STATUS_NOTASSIGNED",
		"title": "Change status to 'Not assigned'",
		"desc": null,
		"isinfo": false,
		"isprimary            "isDefault": false,
            "isDraft": false,
        "affectsRights": true, 		"style": "Default", 		"uicontrolcurrency": "NoneEUR"
	  },
	  { 		"id": "ADMIN_STATUS_NOTSTARTED", 		"title": "Change status to 'Not started'",
		"desc": null, 		"isinfocurrencyt": false,
		"isprimaryEuro": false,
     
  "affectsRights": true,         "stylecomments": "Default",
		"uicontrol": "None" 	  } 	],   "uicontrols": {
    "Termscontractno": { "termsShow":
   true },    }
"None": null   },]
}