Workflow API V3

Permissions

To use the WorkflowV3 API a user is needed with a API access key and permission:

Can access Api V3 Workflow Supply ReceptionController

Can access Api V3 Workflow ShipmentController

Headers

CG-Access-key : the Clougistic user access key

CG-Entity-ID : the Clougistic entity

Content-Type : application/json

Accept: application/json

Create a Shipment Workflow

It is mandatory that the order status is 'processing'.

Method: POST

Resource:  /api/v3/workflow/shipment

Sample Request

{

"process_batch_id":[id],

"items":[

{

"sku":"TEST1",

"qty":1

},

{

"sku":"TEST2",

"qty":2

},

{

"sku":"TEST3",

"qty":3

}

]

}


Response 200 OK

{ "data": "OK", "status": "success" }

Response 422

{

   "data": "Only a processing order can be shipped. Current status is \"New\"",

   "status": "failure"

} 

Response 422

{

    "data": "Inventory Location for SKU/GTIN [SCR4535-200] Zone ID [1] Path [] does not exist.",

    "status": "failure"

}

Create a Reception Workflow

It is mandatory that the purchase order status is 'processing'.

Method: POST

Resource:  /api/v3/workflow/supply/reception

Sample Request

{

"purchase_id":[purchase id],

"zone_id":[zone id],

"items":[

{

"sku":"TEST1",

"qty":1

},

{

"sku":"TEST2",

"qty":2

},

{

"sku":"TEST3",

"qty":3

}

]

}

Response 200 OK

{ "data": "OK", "status": "success" }

Response 422

{ "data": "Qty [2] exceeds maximum qty receivable of [0]", "status": "failure" }