| GET,POST,PUT,DELETE,OPTIONS | /v1/Inventory/{InventoryID} | ||
|---|---|---|---|
| GET,POST,PUT,DELETE,OPTIONS | /v1/Inventory |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class InventoryRequest
{
public Integer InventoryID = null;
public ArrayList<Inventory> Inventory = new ArrayList<Inventory>();
public Integer getInventoryID() { return InventoryID; }
public InventoryRequest setInventoryID(Integer value) { this.InventoryID = value; return this; }
public ArrayList<Inventory> getInventory() { return Inventory; }
public InventoryRequest setInventory(ArrayList<Inventory> value) { this.Inventory = value; return this; }
}
public static class Inventory
{
public Integer InventoryID = null;
public Integer EquipmentID = null;
public Date RecordCreatedDate = null;
public Date DeletedDate = null;
public Integer Quantity = null;
public String InventoryLocation = null;
public String Notess = null;
public UUID CreatedByUID = null;
public Integer getInventoryID() { return InventoryID; }
public Inventory setInventoryID(Integer value) { this.InventoryID = value; return this; }
public Integer getEquipmentID() { return EquipmentID; }
public Inventory setEquipmentID(Integer value) { this.EquipmentID = value; return this; }
public Date getRecordCreatedDate() { return RecordCreatedDate; }
public Inventory setRecordCreatedDate(Date value) { this.RecordCreatedDate = value; return this; }
public Date getDeletedDate() { return DeletedDate; }
public Inventory setDeletedDate(Date value) { this.DeletedDate = value; return this; }
public Integer getQuantity() { return Quantity; }
public Inventory setQuantity(Integer value) { this.Quantity = value; return this; }
public String getInventoryLocation() { return InventoryLocation; }
public Inventory setInventoryLocation(String value) { this.InventoryLocation = value; return this; }
public String getNotess() { return Notess; }
public Inventory setNotess(String value) { this.Notess = value; return this; }
public UUID getCreatedByUID() { return CreatedByUID; }
public Inventory setCreatedByUID(UUID value) { this.CreatedByUID = value; return this; }
}
public static class InventoryResponse
{
public ResponseStatus ResponseStatus = null;
public ArrayList<Inventory> Inventory = new ArrayList<Inventory>();
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public InventoryResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public ArrayList<Inventory> getInventory() { return Inventory; }
public InventoryResponse setInventory(ArrayList<Inventory> value) { this.Inventory = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Inventory/{InventoryID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
InventoryID: 0,
Inventory:
[
{
InventoryID: 0,
EquipmentID: 0,
RecordCreatedDate: 0001-01-01,
DeletedDate: 0001-01-01,
Quantity: 0,
InventoryLocation: String,
Notess: String,
CreatedByUID: 00000000000000000000000000000000
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Inventory:
[
{
InventoryID: 0,
EquipmentID: 0,
RecordCreatedDate: 0001-01-01,
DeletedDate: 0001-01-01,
Quantity: 0,
InventoryLocation: String,
Notess: String,
CreatedByUID: 00000000000000000000000000000000
}
]
}