This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Consignments in Vend
Overview
The following operations allow you to work with consignments. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with consignments, see Sample configuration.
Operation | Description |
---|---|
Creates a consignment. | |
updateConsignment | Updates consignment details. |
listConsignments | Retrieves all consignments. |
Operation details
This section provides further details on the operations related to consignments.
Creating a consignment
The
operation creates a new consignment.createConsignment
<vend.createConsignment> <name>{$ctx:name}</name> <type>{$ctx:type}</type> <date>{$ctx:date}</date> <dueAt>{$ctx:dueAt}</dueAt> <outletId>{$ctx:outletId}</outletId> <supplierId>{$ctx:supplierId}</supplierId> <sourceOutletId>{$ctx:sourceOutletId}</sourceOutletId> <status>{$ctx:status}</status> </vend.createConsignment>
Properties
Name of the consignment.name:
Type of the consignment. Possible values are STOCKTAKE, SUPPLIER, OUTLET.type:
Date of the consignment.date:
The date the consignment is due.dueAt:
Outlet ID of the consignment.outletId:
Supplier ID of the consignment.supplierId:
Source outlet ID of the consignment.sourceOutletId:
Status of the consignment.status:
Sample request
Following is a sample REST/JSON request that can be handled by the createConsignment
operation.
{ "apiUrl": "https://hormondri.vendhq.com", "accessToken": "Rd29HhdkxQq0b5pA1Litw8G05KFF3A3JZK0pQfQL", "name": "consignment name A001", "type": "SUPPLIER", "date": "2010-01-01 14:01:01", "dueAt": "2012-01-01 10:01:01", "outletId": "8b308d74-6b62-102e-bfb4-6e9396395811", "supplierId": "a705c4c8-4348-11e2-afe9-4040cae8f5d3", "sourceOutletId": "8b31ac4a-6b62-102e-bfb4-6e9396395811", "status": "OPEN" }
Related Vend documentation
https://developers.vendhq.com/documentation/api/0.x/consignments.html#post-api-consignment
Updating consignment details
The
operation updates consignment details.updateConsignment
<vend.updateConsignment> <name>{$ctx:name}</name> <type>{$ctx:type}</type> <date>{$ctx:date}</date> <dueAt>{$ctx:dueAt}</dueAt> <outletId>{$ctx:outletId}</outletId> <supplierId>{$ctx:supplierId}</supplierId> <sourceOutletId>{$ctx:sourceOutletId}</sourceOutletId> <status>{$ctx:status}</status> <consignmentId>{$ctx:consignmentId}</consignmentId> </vend.updateConsignment>
Properties
Name of the consignment.name:
Type of the consignment. Possible values are STOCKTAKE, SUPPLIER, OUTLET.type:
Date of the consignment.date:
The date the consignment is due.dueAt:
Outlet ID of the consignment.outletId:
Supplier ID of the consignment.supplierId:
Source outlet ID of the consignment.sourceOutletId:
Status of the consignment.status:
The ID of the consignment to update.consignmentId:
Sample request
Following is a sample REST/JSON request that can be handled by the updateConsignment
operation.
{ "apiUrl": "https://hormondri.vendhq.com", "accessToken": "Rd29HhdkxQq0b5pA1Litw8G05KFF3A3JZK0pQfQL", "name": "consignment name A001", "type": "SUPPLIER", "date": "2010-01-01 14:01:01", "dueAt": "2012-01-01 10:01:01", "outletId": "8b308d74-6b62-102e-bfb4-6e9396395811", "supplierId": "a705c4c8-4348-11e2-afe9-4040cae8f5d3", "sourceOutletId": "8b31ac4a-6b62-102e-bfb4-6e9396395811", "status": "OPEN", "consignmentId": "123456789" }
Related Vend documentation
https://developers.vendhq.com/documentation/api/0.x/consignments.html#put-api-consignment-id
Retrieving all consignments
The
operation retrieves all consignments.listConsignments
<vend.listConsignments> </vend.listConsignments>
Sample request
Following is a sample REST/JSON request that can be handled by the listConsignments
operation.
{ "apiUrl": "https://hormondri.vendhq.com", "accessToken": "Rd29HhdkxQq0b5pA1Litw8G05KFF3A3JZK0pQfQL" }
Related Vend documentation
https://developers.vendhq.com/documentation/api/0.x/consignments.html#get-api-consignment
Sample configuration
Following is a sample proxy service that illustrates how to connect to Vend with the init
operation and use the createConsignment
operation. The sample request for this proxy can be found in the createConsignment sample request.
<?xml version="1.0" encoding="UTF-8"?> <proxy name="vend_createConsignment" startOnLoad="true" statistics="disable" trace="disable" transports="https,http" xmlns="http://ws.apache.org/ns/synapse"> <target> <inSequence onError="faultHandlerSeq"> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="accessToken" expression="json-eval($.accessToken)"/> <property name="name" expression="json-eval($.name)"/> <property name="type" expression="json-eval($.type)"/> <property name="date" expression="json-eval($.date)"/> <property name="dueAt" expression="json-eval($.dueAt)"/> <property name="outletId" expression="json-eval($.outletId)"/> <property name="supplierId" expression="json-eval($.supplierId)"/> <property name="sourceOutletId" expression="json-eval($.sourceOutletId)"/> <property name="status" expression="json-eval($.status)"/> <vend.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <accessToken>{$ctx:accessToken}</accessToken> </vend.init> <vend.createConsignment> <name>{$ctx:name}</name> <type>{$ctx:type}</type> <date>{$ctx:date}</date> <dueAt>{$ctx:dueAt}</dueAt> <outletId>{$ctx:outletId}</outletId> <supplierId>{$ctx:supplierId}</supplierId> <sourceOutletId>{$ctx:sourceOutletId}</sourceOutletId> <status>{$ctx:status}</status> </vend.createConsignment> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>