Go-to-Light Service 4.0.0.2397 - 121 - API License to Cloud Demo

<back to all web services

SaveArea

Requires Authentication
The following routes are available for this service:
All Verbs/SaveArea/{Area}
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AreaContent:
    id: int = 0
    lc_address: Optional[str] = None
    pixel_start: int = 0
    pixel_stop: int = 0
    area_i_d: int = 0
    pos: int = 0
    reverse: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Area:
    area_i_d: int = 0
    label: Optional[str] = None
    stockroom_i_d: Optional[int] = None
    content: List[AreaContent] = field(default_factory=list)
    number_of_pixels: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SaveArea:
    # @ApiMember(Description="Area", IsRequired=true)
    area: Optional[Area] = None
    """
    Area
    """

Python SaveArea 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 /SaveArea/{Area} HTTP/1.1 
Host: clouddemo.pickeos.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<SaveArea xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GoToLightAPI">
  <Area>
    <AreaID>0</AreaID>
    <Content>
      <AreaContent>
        <AreaID>0</AreaID>
        <ID>0</ID>
        <LCAddress>String</LCAddress>
        <PixelStart>0</PixelStart>
        <PixelStop>0</PixelStop>
        <Pos>0</Pos>
        <Reverse>false</Reverse>
      </AreaContent>
    </Content>
    <Label>String</Label>
    <StockroomID>0</StockroomID>
  </Area>
</SaveArea>