| POST | /tasks/{brand}/importrequest | Upload request | Upload sell-outs and customers provided in a file |
|---|
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 ImportRequestResponse:
# @ApiMember(Description="Unique Identifier of the Import Sell-Out and Customer request created", IsRequired=true)
async_task_id: Optional[str] = None
"""
Unique Identifier of the Import Sell-Out and Customer request created
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ImportRequest:
# @ApiMember(Description="Brand Trigram, e.g. CAR, IWC", IsRequired=true)
brand: Optional[str] = None
"""
Brand Trigram, e.g. CAR, IWC
"""
# @ApiMember(Description="Public key of the file in cloud server", IsRequired=true)
external_file_id: Optional[str] = None
"""
Public key of the file in cloud server
"""
# @ApiMember(Description="Type of import e.g. 'SelloutAndCustomer', 'Sellout'", IsRequired=true)
type: Optional[str] = None
"""
Type of import e.g. 'SelloutAndCustomer', 'Sellout'
"""
# @ApiMember(Description="B2 document reference to link the file with the Salesforce record")
download_request_id: Optional[str] = None
"""
B2 document reference to link the file with the Salesforce record
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /tasks/{brand}/importrequest HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"brand":"String","externalFileId":"String","type":"String","downloadRequestId":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"asyncTaskId":"00000000000000000000000000000000"}