TicketUserServices

<back to all web services

WebshopOrderRefundRequest

Requires Authentication
Requires any of the roles:Admin, TeamAdminRequired permission:Tickets.Add
The following routes are available for this service:
POST/Webshop/Order/Refund
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 LocalizedMessage:
    is_: Optional[str] = field(metadata=config(field_name='is'), default=None)
    en: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WebshopRefundResult:
    success: Optional[bool] = None
    partial: Optional[bool] = None
    refunded_amount_minor: Optional[int] = None
    borgun_refund_transaction_id: Optional[str] = None
    status: Optional[str] = None
    message: Optional[LocalizedMessage] = None
    status_code: Optional[int] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WebshopOrderRefundRequest:
    order_id: Optional[int] = None
    order_reference: Optional[str] = None
    line_ids: Optional[List[int]] = None
    restock_lines: Optional[bool] = None
    idempotency_key: Optional[str] = None
    owner_id: Optional[int] = None

Python WebshopOrderRefundRequest DTOs

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

HTTP + CSV

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

POST /Webshop/Order/Refund HTTP/1.1 
Host: stubbur-app.azurewebsites.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"orderId":0,"orderReference":"String","lineIds":[0],"restockLines":false,"idempotencyKey":"String","ownerId":0}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"success":false,"partial":false,"refundedAmountMinor":0,"borgunRefundTransactionId":"String","status":"String","message":{"is":"String","en":"String"},"statusCode":0}