Field Squared API Services

<back to all web services

InventoryTransfer

The following routes are available for this service:
GET,PUT,POST,DELETE/{Workspace}/InventoryTransfer
GET,PUT,POST,DELETE/{Workspace}/InventoryTransfer/{ObjectId}
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Field2Office.API.Model.Inventory;
using Field2Office.DomainObjects.Mappers.Model.Inventory;

namespace Field2Office.API.Model.Inventory
{
    public partial class InventoryTransfer
    {
        public InventoryTransfer()
        {
            Transactions = new List<InventoryTransaction>{};
        }

        public virtual string ObjectId { get; set; }
        public virtual string Workspace { get; set; }
        public virtual string ExternalId { get; set; }
        public virtual string Created { get; set; }
        public virtual string LastUpdated { get; set; }
        public virtual string Description { get; set; }
        public virtual string FromAsset { get; set; }
        public virtual string FromTask { get; set; }
        public virtual string ToAsset { get; set; }
        public virtual string ToTask { get; set; }
        public virtual string SubmittedBy { get; set; }
        public virtual string ApprovedBy { get; set; }
        public virtual bool? Approved { get; set; }
        public virtual List<InventoryTransaction> Transactions { get; set; }
    }

}

namespace Field2Office.DomainObjects.Mappers.Model.Inventory
{
    public partial class InventoryTransaction
    {
        public InventoryTransaction()
        {
            Items = new List<string>{};
            SerialNumbers = new List<string>{};
        }

        public virtual string ItemTypeId { get; set; }
        public virtual int Qty { get; set; }
        public virtual List<string> Items { get; set; }
        public virtual List<string> SerialNumbers { get; set; }
        public virtual bool UseSerialNumbers { get; set; }
    }

}

C# InventoryTransfer DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /{Workspace}/InventoryTransfer HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<InventoryTransfer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Field2Office.API.Model.Inventory">
  <Approved>false</Approved>
  <ApprovedBy>String</ApprovedBy>
  <Created>String</Created>
  <Description>String</Description>
  <ExternalId>String</ExternalId>
  <FromAsset>String</FromAsset>
  <FromTask>String</FromTask>
  <LastUpdated>String</LastUpdated>
  <ObjectId>String</ObjectId>
  <SubmittedBy>String</SubmittedBy>
  <ToAsset>String</ToAsset>
  <ToTask>String</ToTask>
  <Transactions xmlns:d2p1="http://schemas.datacontract.org/2004/07/Field2Office.DomainObjects.Mappers.Model.Inventory">
    <d2p1:InventoryTransaction>
      <d2p1:ItemTypeId>String</d2p1:ItemTypeId>
      <d2p1:Items xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:Items>
      <d2p1:Qty>0</d2p1:Qty>
      <d2p1:SerialNumbers xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </d2p1:SerialNumbers>
      <d2p1:UseSerialNumbers>false</d2p1:UseSerialNumbers>
    </d2p1:InventoryTransaction>
  </Transactions>
  <Workspace>String</Workspace>
</InventoryTransfer>