Manufacturing order (Version 1)

Endpoints

Create / update MO

/mes/companies/{companycode}/establishments/{establishmentcode}/mos

Description

Returns created / updated MO.

Parameters

Type Name Description Schema Associated rules

Path

companyCode
required

Current context company code

string

Path

establishmentCode
required

Current context establishment code

string

Body

body
required

Manufacturing order

MO

Responses

HTTP Code Description Schema

201

Successfully created

MO

400

Functionnal error

No Content

500

Internal server error

No Content

Consumes

  • application/json

Produces

  • application/json

Get one MO

/mes/companies/{companycode}/establishments/{establishmentcode}/mos/{code}

Description

Returns retrieved MO.

Parameters

Type Name Description Schema Associated rules

Path

companyCode
required

Current context company code

string

Path

establishmentCode
required

Current context establishment code

string

Path

code
required

Mo code to retrieve

string

R14

Responses

HTTP Code Description Schema

200

Successful

MO

404

Entity not found

No Content

500

Internal server error

No Content

Produces

  • application/json

Delete MO

/mes/companies/{companycode}/establishments/{establishmentcode}/mos/{code}

Description

In fact disable this MO.

Parameters

Type Name Description Schema Associated rules

Path

companyCode
required

Current context company code

string

Path

establishmentCode
required

Current context establishment code

string

Path

code
required

Entity public uuid code to delete

string

Responses

HTTP Code Description Schema

204

Succefully deleted

No Content

400

Functionnal error

No Content

500

Internal server error

No Content

Produces

  • application/json

Data structure

MO

Description of a manufacturing order (MO).

Name Description Value Associated rules

companyCode
required

Current company code

string

establishmentCode
required

Current establishment code

string

moNb
optional

string

R1

lineCode
required

Line code

string

R2 R7

lineConfigurationCode
optional

Line configuration code

string

R3

itemCode
required

Item code

string

R4

batchCode
optional

string

R5

quantity
required

Quantity

double

R6

unitCode
required

Unit code

string

R7

plannedBeginDateTime
optional

datetime (ISO-8601)

R8

plannedEndDateTime
optional

datetime (ISO-8601)

R8

descriptionComment
optional

string

moHeaderCriterionValues
optional

seqNumberInDay
optional

integer

R13

state
optional

string (AWAITING, IN_PROGRESS, FINISHED, SUSPENDED)

R15

childMos
optional

< integer > list

R16

realBeginDate
optional

datetime (ISO-8601)

realEndDate
optional

datetime (ISO-8601)

quantityDone
optional

double

R17

quantityFinal
optional

double

R17

MoHeaderCriterionValue

Name Value Associated rules

criterionCode
optional

string

R9

dataEntryMode
optional

string (UNI, BOR, LIS)

R10

minValue
optional

string

maxValue
optional

string

R12

Rules

R1

moNb should contain 12 characters or less. Those characters can be letters or numbers.
If a manufactoring order (MO) exists for companyCode, establishmentCode and moNb as external id, this MO will be updated.
Otherwise a new MO is created.

If moNb is not set, a new MO is created without external id. This MO will not be updated or deleted using webservices.

If MO already exists and has already been started, it cannot be updated.

If MO has been splitted (MO scheduling feature), it cannot be updated.

R2

lineCode should refer to a resource that exists for these companyCode and establishmentCode. This resource should be a production line.

R3

If lineConfigurationCode is set, it should be be configuration of lineCode.

If lineConfigurationCode is not set, there should be a configuration of lineCode that can produce itemCode.

R4

itemCode should be an existing production item for companyCOde and establishmentCode.

R5

batchCode is optional; if it is set, and if there is no batch with this code, the batch is created.

R6

quantity should be strictly greater than 0.

R7

unitCode should exist and should be lineCode cadency unit or there should be a conversion between unitCode and lineCode cadency unit.

R8

Either plannedBeginDateTime or plannedEndDateTime should be set.

If both plannedBeginDateTime and plannedEndDateTime are set, begin date should be before end date.

R9

If criterionCode in moHeaderCriterionValues does not exist, values for this criterion are ignored.

R10

For dataEntryMode, only 'UNI' value is handled.

R11

If criterionCode exists and dataEntryMode is 'UNI', minValue is mandatory.

R12

maxValue is not used yet.

R13

seqNumberInDay is a positive integer. It is used to order MO in the same day.

R14

MO with code as external MO number should exist for companyCode and establishmentCode.

R15

state can have the following values :

  • AWAITING : MO is ready to be started

  • IN_PROGRESS : MO is in progress

  • SUSPENDED : MO is suspended

  • FINISHED : MO is finished

R16

childMos is set when the MO ha been splitted in the MES MO scheduling. In that case, childMos has the list of "children mos" number, the ones created from the split.

R17

quantityDone and quantityFinal should be in lineCode cadency unit.

R18

MO already started can’t be deleted.

R19

If criterionCode in moHeaderCriterionValues exists and criterion type is string, minValue in moHeaderCriterionValues should be a string without forbidden special caracter and should match existing values.

R20

If criterionCode in moHeaderCriterionValues exists and criterion type is date, minValue in moHeaderCriterionValues should be a date with format 'YYYY-MM-DD'.

R21

If criterionCode in moHeaderCriterionValues exists and criterion type is numeric, minValue in moHeaderCriterionValues should be a number (positive or negative).

R23

If criterionCode in moHeaderCriterionValues exists and criterion type is integer, minValue in moHeaderCriterionValues should be an integer (positive or negative).

R24

If criterionCode in moHeaderCriterionValues exists and criterion type is logical, minValue in moHeaderCriterionValues should be a boolean.