CL$WS Host : D5239-staging-cl

<back to all web services

cr_photoRequest

The following routes are available for this service:
GET, POST/cr_photo/{id_cr}/{id_tournee}
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 _cr_photo:
    id_cr: Optional[str] = None
    id_tournee: Optional[str] = None
    num_facture: Optional[str] = None
    type: int = 0
    index: int = 0
    path: Optional[str] = None
    photo: Optional[str] = None
    photo_light: Optional[str] = None
    date: Optional[str] = None
    latitude: float = 0.0
    longitude: float = 0.0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class cr_photoResponse:
    id_cr: Optional[str] = None
    id_tournee: Optional[str] = None
    multi_photos: Optional[List[_cr_photo]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class cr_photoRequest:
    id_cr: Optional[str] = None
    id_tournee: Optional[str] = None
    multi_photos: Optional[List[_cr_photo]] = None

Python cr_photoRequest DTOs

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

HTTP + OTHER

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

POST /cr_photo/{id_cr}/{id_tournee} HTTP/1.1 
Host: freemotion-staging.milliet.paris 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id_cr":"String","id_tournee":"String","multi_photos":[{"id_cr":"String","id_tournee":"String","num_facture":"String","type":0,"index":0,"path":"String","photo":"String","photo_light":"String","date":"String","latitude":0,"longitude":0}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"id_cr":"String","id_tournee":"String","multi_photos":[{"id_cr":"String","id_tournee":"String","num_facture":"String","type":0,"index":0,"path":"String","photo":"String","photo_light":"String","date":"String","latitude":0,"longitude":0}]}