Activity

Endpoints

Create new activity

/companies/{companycode}/establishments/{establishmentcode}/activities

Description

Returns created activity.

Parameters

Type Name Description Schema Business Rules

Path

companyCode
required

Current context company code

string

2 characters max

Path

establishmentCode
required

Current context establishment code

string

2 characters max

Body

body
required

Responses

HTTP Code Description Schema

201

Successfully created

400

Functionnal error

No Content

500

Internal server error

No Content

Consumes

  • application/json

Produces

  • application/json

Get entity list

/companies/{companycode}/establishments/{establishmentcode}/activities

Description

Returns entities.

Parameters

Type Name Description Schema Business Rules

Path

companyCode
required

Current context company code

string

2 characters max

Path

establishmentCode
required

Current context establishment code

string

2 characters max

Query

page
optional

Page index

integer (int32)

Query

size
optional

Entity count per page

integer (int32)

Responses

HTTP Code Description Schema

200

Successfull

< Activity > array

400

Functionnal error

No Content

500

Internal server error

No Content

Produces

  • application/json

Import entity list

/companies/{companycode}/establishments/{establishmentcode}/activities/import

Parameters

Type Name Description Schema Business Rules

Path

companyCode
required

Current context company code

string

2 characters max

Path

establishmentCode
required

Current context establishment code

string

2 characters max

Body

body
required

Responses

HTTP Code Description Schema

202

Accepted

No Content

400

Functionnal error

No Content

500

Internal server error

No Content

Consumes

  • application/json

Produces

  • application/json

Get one activity

/companies/{companycode}/establishments/{establishmentcode}/activities/{code}

operation.deprecated

Description

Returns retrieved activity.

Parameters

Type Name Description Schema Business Rules

Path

code
required

Activity code to retrieve

string

20 characters max

Path

companyCode
required

Current context company code

string

2 characters max

Path

establishmentCode
required

Current context establishment code

string

2 characters max

Responses

HTTP Code Description Schema

200

Successful

404

Entity not found

No Content

500

Internal server error

No Content

Produces

  • application/json

Delete activity

/companies/{companycode}/establishments/{establishmentcode}/activities/{code}

Description

In fact disable this entity.

Parameters

Type Name Description Schema Business Rules

Path

code
required

Activity public uuid code to delete

string

20 characters max

Path

companyCode
required

Current context company code

string

2 characters max

Path

establishmentCode
required

Current context establishment code

string

2 characters max

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

Activity

Description of an activity.

Name Description Value Business Rules

areaCode
optional

Area code

string

10 characters max
All characters in uppercase accepted except characters \ ; | " < > µ and spaces at the beginning and at the end

code
required

Activity code

string

20 characters max

companyCode
required

Current company code

string

2 characters max

contexts
optional

details
optional

establishmentCode
required

Current establishment code

string

2 characters max

familyCode
required

Family code

string

10 characters max

flowType
required

Flow type

string

IN(PUSH,PULL)

label
required

Activity label

string

50 characters max

publicUuid
optional
read-only

Activity public uuid

string

referenceItemCode
required

Reference item code

string

20 characters max

referenceUnitCode
required

Reference unit code

string

5 characters max

validityEndDate
optional

datetime

YYYY-MM-DDTHH:MM:SSZ
Set a passed date to make the entity inactive.

ActivityDetail

Name Description Value

costItems
optional

CostItem list

inputs
optional

The order send in JSON is the order used in input items list

operations
optional

The order send in JSON is the order used in operations list

outputs
optional

The order send in JSON is the order used in output items list

referenceQuantity
optional

double

ActivityInput

Name Value Business Rules

depositCode
optional

string

10 characters max

fixed
optional

boolean

itemCode
optional

string

20 characters max

quantity
optional

double

MUST HAVE at most same number of decimal places as item’s unit

shrinkageLine
optional

boolean

shrinkageRate
optional

double

MUST BE SET IF shrinkageLine = TRUE

substituteItems
optional

list

unitCode
optional

string

5 characters max

comment
optional

string

100 characters max

ActivityOperation

Name Value Business Rules

default
optional

boolean

operatingProcessCode
optional

string

20 characters max

ActivityOutput

Name Value Business Rules

depositCode
optional

string

10 characters max

fixed
optional

boolean

itemCode
optional

string

20 characters max

quantity
optional

double

MUST HAVE at most same number of decimal places as item’s unit

shrinkageLine
optional

boolean

shrinkageRate
optional

double

MUST BE SET IF shrinkageLine = TRUE

unitCode
optional

string

5 characters max

comment
optional

string

100 characters max

CostItem

Name Value Business Rules

fixed
optional

boolean

itemCode
optional

string

20 characters max

quantity
optional

double

MUST HAVE at most same number of decimal places as item’s unit

unitCode
optional

string

5 characters max

ImportActivityList

Name Value

callback
optional

string

data
optional

Activity list