Trendsic Platform Service

<back to all web services

ContainersRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/records/warehouse/containers
import 'package:servicestack/servicestack.dart';

class ContainerItemDto implements IConvertible
{
    String? Id;
    String? Name;
    String? Flag;
    bool? Warn;

    ContainerItemDto({this.Id,this.Name,this.Flag,this.Warn});
    ContainerItemDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Flag = json['Flag'];
        Warn = json['Warn'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Flag': Flag,
        'Warn': Warn
    };

    getTypeName() => "ContainerItemDto";
    TypeContext? context = _ctx;
}

class RecordContainerDto implements IConvertible
{
    int? ContainerId;
    String? Barcode;
    String? Kind;
    String? Icon;
    String? Name;
    String? ZoneKey;
    String? Slot;
    String? Status;
    String? CheckoutJson;
    List<ContainerItemDto>? Items = [];

    RecordContainerDto({this.ContainerId,this.Barcode,this.Kind,this.Icon,this.Name,this.ZoneKey,this.Slot,this.Status,this.CheckoutJson,this.Items});
    RecordContainerDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ContainerId = json['ContainerId'];
        Barcode = json['Barcode'];
        Kind = json['Kind'];
        Icon = json['Icon'];
        Name = json['Name'];
        ZoneKey = json['ZoneKey'];
        Slot = json['Slot'];
        Status = json['Status'];
        CheckoutJson = json['CheckoutJson'];
        Items = JsonConverters.fromJson(json['Items'],'List<ContainerItemDto>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ContainerId': ContainerId,
        'Barcode': Barcode,
        'Kind': Kind,
        'Icon': Icon,
        'Name': Name,
        'ZoneKey': ZoneKey,
        'Slot': Slot,
        'Status': Status,
        'CheckoutJson': CheckoutJson,
        'Items': JsonConverters.toJson(Items,'List<ContainerItemDto>',context!)
    };

    getTypeName() => "RecordContainerDto";
    TypeContext? context = _ctx;
}

class ContainersResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<RecordContainerDto>? Containers = [];

    ContainersResponse({this.ResponseStatus,this.Containers});
    ContainersResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        Containers = JsonConverters.fromJson(json['Containers'],'List<RecordContainerDto>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'Containers': JsonConverters.toJson(Containers,'List<RecordContainerDto>',context!)
    };

    getTypeName() => "ContainersResponse";
    TypeContext? context = _ctx;
}

class ContainersRequest implements IConvertible
{
    ContainersRequest();
    ContainersRequest.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "ContainersRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'ContainerItemDto': TypeInfo(TypeOf.Class, create:() => ContainerItemDto()),
    'RecordContainerDto': TypeInfo(TypeOf.Class, create:() => RecordContainerDto()),
    'List<ContainerItemDto>': TypeInfo(TypeOf.Class, create:() => <ContainerItemDto>[]),
    'ContainersResponse': TypeInfo(TypeOf.Class, create:() => ContainersResponse()),
    'List<RecordContainerDto>': TypeInfo(TypeOf.Class, create:() => <RecordContainerDto>[]),
    'ContainersRequest': TypeInfo(TypeOf.Class, create:() => ContainersRequest()),
});

Dart ContainersRequest 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.

GET /v1/records/warehouse/containers HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ContainersResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Containers>
    <RecordContainerDto>
      <Barcode>String</Barcode>
      <CheckoutJson>String</CheckoutJson>
      <ContainerId>0</ContainerId>
      <Icon>String</Icon>
      <Items>
        <ContainerItemDto>
          <Flag>String</Flag>
          <Id>String</Id>
          <Name>String</Name>
          <Warn>false</Warn>
        </ContainerItemDto>
      </Items>
      <Kind>String</Kind>
      <Name>String</Name>
      <Slot>String</Slot>
      <Status>String</Status>
      <ZoneKey>String</ZoneKey>
    </RecordContainerDto>
  </Containers>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</ContainersResponse>