| GET | /document/{DocumentType}/{IdEntrepot}/{IdSociete}/{IdDocument} | facture / commande | |
|---|---|---|---|
| GET | /document/{DocumentType}/{IdEntrepot}/{IdGroupe}/{IdSociete}/{Year}/{Month} | r99 : relevé mensuel de factures |
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
class eapi_document_type_enum(str, Enum):
FACTURE = 'facture'
COMMANDE = 'commande'
R98 = 'r98'
R99 = 'r99'
BALANCE = 'balance'
# @Api(Description="Service de création de documents")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class document:
"""
Service de création de documents
"""
# @ApiMember(DataType="string", Description="document type", IsRequired=true, Name="DocumentType", ParameterType="path")
document_type: Optional[eapi_document_type_enum] = None
"""
document type
"""
# @ApiMember(DataType="integer", Description="n° entrepot", IsRequired=true, Name="IdEntrepot", ParameterType="path")
id_entrepot: int = 0
"""
n° entrepot
"""
# @ApiMember(DataType="integer", Description="n° groupe", IsRequired=true, Name="IdGroupe", ParameterType="path")
id_groupe: int = 0
"""
n° groupe
"""
# @ApiMember(DataType="integer", Description="n° client", IsRequired=true, Name="IdSociete", ParameterType="path")
id_societe: int = 0
"""
n° client
"""
# @ApiMember(DataType="integer", Description="n° document", IsRequired=true, Name="IdDocument", ParameterType="path", Route="/document/{DocumentType}/{IdEntrepot}/{IdSociete}/{IdDocument}")
id_document: int = 0
"""
n° document
"""
# @ApiMember(DataType="integer", Description="année", IsRequired=true, Name="Year", ParameterType="path", Route="/document/{DocumentType}/{IdEntrepot}/{IdSociete}/{Year}/{Month}")
year: int = 0
"""
année
"""
# @ApiMember(DataType="integer", Description="mois", IsRequired=true, Name="Month", ParameterType="path", Route="/document/{DocumentType}/{IdEntrepot}/{IdSociete}/{Year}/{Month}")
month: int = 0
"""
mois
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /document/{DocumentType}/{IdEntrepot}/{IdSociete}/{IdDocument} HTTP/1.1
Host: milliet.io
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{}