1Fetch Client API

<back to all web services

GetProofOfDelivery

The following routes are available for this service:
GET/proofofdeliveryGet a pdf of the ePOD generated for an order after completion.
import 'package:servicestack/servicestack.dart';

class ApiServiceRequest implements IServiceRequest, IHasApiKey, IConvertible
{
    /**
    * The API Key required for authentication
    */
    // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
    String? ApiKey;

    ApiServiceRequest({this.ApiKey});
    ApiServiceRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ApiKey = json['ApiKey'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ApiKey': ApiKey
    };

    getTypeName() => "ApiServiceRequest";
    TypeContext? context = _ctx;
}

class GetProofOfDelivery extends ApiServiceRequest implements ILogRequest, IConvertible
{
    /**
    * The ID of the order
    */
    // @ApiMember(Description="The ID of the order")
    String? OrderId;

    /**
    * The 1F waybill for the order
    */
    // @ApiMember(Description="The 1F waybill for the order")
    String? Waybill;

    GetProofOfDelivery({this.OrderId,this.Waybill});
    GetProofOfDelivery.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        OrderId = json['OrderId'];
        Waybill = json['Waybill'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'OrderId': OrderId,
        'Waybill': Waybill
    });

    getTypeName() => "GetProofOfDelivery";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.1fetch.co.za', types: <String, TypeInfo> {
    'ApiServiceRequest': TypeInfo(TypeOf.Class, create:() => ApiServiceRequest()),
    'GetProofOfDelivery': TypeInfo(TypeOf.Class, create:() => GetProofOfDelivery()),
});

Dart GetProofOfDelivery 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.

GET /proofofdelivery HTTP/1.1 
Host: api.1fetch.co.za 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />