Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

This method is work in progress and not yet available.

This method returns information on the current status of the order and the status transitions available to the connected user. Note that internal managers can generally make any status transition whereas a client needs to follow a natural flow of transition (exactly as this is implemented in the Wordbee Translator user interface).

URL

(GET) /api/orders/{orderId}/status/transitions

PARAMETERS

URL parameters are:

orderId

The numeric order ID. See orders/list to find orders.

integer, Mandatory

RESULTS

The result is a JSON object with these properties:

current

Contains the current order’s status.

object

current.status

The current (numeric) status. See Order status

integer

current.statust

Status print title.

string

transitions

Array with all status transitions available given the context of the order. These are typically the transitions that a regular user can choose from. Only internal managers can side step this list.

Example:

"transitions": [
{
	"title": "Close order",
	"status": 5,
	"statust": "Closed",
	"isDefault": true,
	"instructions": "Click OK to confirm that this order can be closed."
},
...
]

See table below for details.

object[]

overrides

An array of status transitions that a manager-level user has access to. Whereas transitions are the recommended statuses, overrides are used to fix any issues or handle exceptions.

The overrides contain the numeric status code and the print title.

The list is empty unless the user is an internal manager.

Example:

"overrides": [
{
	"status": 3,
	"statust": "Work done"
},
...]

object[]

The transitions node contains zero, one or more status transitions, each with these properties:

title

The print title of the transition. Such as “Close work” to transition to status “Closed”.

string

status

The current (numeric) status. See Order status

integer

statust

Status print title.

string

isDefault

True if this is the default transition in the present list of transitions. In a user interface this would be highlighted as the default action.

bool

instructions

Additional information for the user about purpose and result of transition.

string

EXAMPLE

A typical result as seen by an internal manager. Other users including clients will see an empty overrides list.

The order status tells that the client has accepted the deliverables. The manager is now given two transitions: Close the order or re-open work in case something was missing. Nevertheless, the manager can also transition to any other status as shown in the overrides list. To make a status change you would use method orders/{orderId}/status (PUT)

{
    "current": {
        "status": 4,
        "statust": "Results approved"
    },
    "transitions": [
        {
            "title": "Close order",
            "status": 5,
            "statust": "Closed",
            "isDefault": true,
            "instructions": "Click OK to confirm that this order can be closed and no more action is required. Closed orders cannot be edited anymore."
        },
        {
            "title": "Re-open work",
            "status": 2,
            "statust": "In progress",
            "isDefault": false,
            "instructions": "More work is required. Click OK to reopen the order."
        }
    ],
    "overrides": [
        {
            "status": 0,
            "statust": "Request"
        },
        {
            "status": 1,
            "statust": "Proposal"
        },
        {
            "status": 2,
            "statust": "In progress"
        },
        {
            "status": 3,
            "statust": "Work done"
        },
        {
            "status": 5,
            "statust": "Closed"
        },
        {
            "status": 10,
            "statust": "Cancelled"
        }
    ],
    "isclient": false,
    "canChangeStatus": true,
    "canOverrideStatus": true
}

ACCESS RIGHTS

This method is available to any user (clients, internal users) who has access to the given order online.

  • No labels