Required role: | Admin | Required permission: | CanAccess |
GET | /async/products |
---|
"use strict";
export class PaginationBase {
/** @param {{skip?:number,take?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {?number}
* @description The number of query results to skip. */
skip;
/**
* @type {?number}
* @description The number of query results to include. */
take;
}
export class RetrieveAllProductsBase extends PaginationBase {
/** @param {{includeOrders?:boolean,skipOrders?:number,takeOrders?:number,skip?:number,take?:number,skip?:number,take?:number}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {?boolean}
* @description Should the related orders of the account be included in the retrieved products? */
includeOrders;
/**
* @type {?number}
* @description Specifies the number of orders to skip per product. Applicable only when 'IncludeOrders' is true. */
skipOrders;
/**
* @type {?number}
* @description Specifies the number of orders to include per product. Applicable only when 'IncludeOrders' is true. */
takeOrders;
/**
* @type {?number}
* @description The number of query results to skip. */
skip;
/**
* @type {?number}
* @description The number of query results to include. */
take;
}
export class Product {
/** @param {{id?:number,index?:number,name?:string,version?:string,description?:string,tags?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The unique identifier of the product. */
id;
/**
* @type {number}
* @description The position of this instance in a collection of 'Product' instances */
index;
/**
* @type {string}
* @description The name of the product. */
name;
/**
* @type {string}
* @description The version of the product. */
version;
/**
* @type {?string}
* @description The version of the product. */
description;
/**
* @type {string[]}
* @description Tags associated with the product. */
tags;
}
export class ProductQueryResponse extends QueryResponse {
/** @param {{ordersMap?:{ [index: number]: Order[]; },offset?:number,total?:number,results?:Product[],meta?:{ [index: string]: string; },responseStatus?:ResponseStatus,offset?:number,total?:number,results?:T[],meta?:{ [index: string]: string; },responseStatus?:ResponseStatus}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {{ [index: number]: Order[]; }}
* @description The dictionary of orders associated with each found product. */
ordersMap;
/** @type {number} */
offset;
/** @type {number} */
total;
/** @type {Product[]} */
results;
/** @type {{ [index: string]: string; }} */
meta;
/** @type {ResponseStatus} */
responseStatus;
}
export class RetrieveAllProductsAsync extends RetrieveAllProductsBase {
/** @param {{includeOrders?:boolean,skipOrders?:number,takeOrders?:number,skip?:number,take?:number,includeOrders?:boolean,skipOrders?:number,takeOrders?:number,skip?:number,take?:number,skip?:number,take?:number}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {?boolean}
* @description Should the related orders of the account be included in the retrieved products? */
includeOrders;
/**
* @type {?number}
* @description Specifies the number of orders to skip per product. Applicable only when 'IncludeOrders' is true. */
skipOrders;
/**
* @type {?number}
* @description Specifies the number of orders to include per product. Applicable only when 'IncludeOrders' is true. */
takeOrders;
/**
* @type {?number}
* @description The number of query results to skip. */
skip;
/**
* @type {?number}
* @description The number of query results to include. */
take;
}
/** @typedef T {any} */
export class QueryResponse {
/** @param {{offset?:number,total?:number,results?:T[],meta?:{ [index: string]: string; },responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
offset;
/** @type {number} */
total;
/** @type {T[]} */
results;
/** @type {{ [index: string]: string; }} */
meta;
/** @type {ResponseStatus} */
responseStatus;
}
JavaScript RetrieveAllProductsAsync DTOs
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.
GET /async/products HTTP/1.1 Host: taxfiling.pwc.de Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"ordersMap":{"0":[{"id":0,"productId":0,"accountId":0,"name":"String","serviceName":"String","requestTimestamp":"\/Date(-62135596800000-0000)\/","responseTimestamp":"\/Date(-62135596800000-0000)\/","requestUri":"String","requestHttpMethod":"String","requestDuration":"PT0S","responseStatusCode":"Continue","clientIPAddress":"String","unitOfMeasurement":"String","processType":"String","dataType":"String","dataName":"String","creationDate":"\/Date(-62135596800000-0000)\/","expiryDate":"\/Date(-62135596800000-0000)\/","isTest":false}]},"offset":0,"total":0,"results":[{"id":0,"index":0,"name":"String","version":"String","description":"String","tags":["String"]}],"meta":{"String":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}