X-ERP Help

04. Examples and downloads

Copyable requests, a reading PowerShell quick start and OpenAPI for download.

Sample templates

The OpenAPI file and sample templates are part of the developer package to be provided separately.

The OpenAPI file and sample templates are part of the developer package to be provided separately.

The prepared ZIP, which has not yet been publicly released for download, contains README.txt with release notes, openapi.yaml, quickstart.ps1 for PowerShell 7, and requests.http for an HTTP client with cookie management. The quick start only performs authentication and catalog reading. The HTTP file also contains an explicitly marked manual shopping cart write call. The examples were not run against a productive customer system.

Read shopping cart

After technical login with the same cookie session:

GET /api/WebshopUserCart/GetWebshopUserCart?partnerId=123
Accept: application/json

What is expected is an APIEntityResponse with a list of UserCartDto. Check success, positions, quantities, totals and addresses.

Add test items

Only with a released test item and WebshopUserCart-Create:

POST /api/WebshopUserCart/AddToCart?partnerId=123
Content-Type: application/json

{"articleId":"TESTARTIKEL","quantity":1}

The call can increase the quantity of an already existing position. Therefore, if time is exceeded, first re-read the shopping cart and do not require automatic repetition.

Change quantity

Use the item ID from the read cart, not the item ID. In the example, 456 is a placeholder:

PUT /api/WebshopUserCart/UpdateCartItem?id=456&quantity=2

Quantity 0 removes the position. Negative quantities are technically invalid. The success characteristic of the response must also be checked for HTTP 200.

Prepare order

For completion, partnerId and employeeId are used as query parameters as well as deliveryAddress and billingAddress in the JSON body. The complete address fields are in the OpenAPI file. Adopt a checked address object and validate the generated test document technically.

POST /api/WebshopUserCart/WebshopPlaceOrder?partnerId=123&employeeId=7
Content-Type: application/json

This is the call signature, not a full executable checkout request. A body with both address objects is required. Due to the documented differences in document ID and address transfer, the quick start script deliberately does not contain an automatic order completion.

Read helpdesk with pagination

Replace the test values and use the appropriate authorized session:

GET /api/Helpdesk/123/true/PageFromViewForPartner?skip=0&take=25&requireTotalCount=true
Accept: application/json

A DataSourceLoadOptions result is expected here, not necessarily the success/data/errorMessages envelope. Load subsequent pages with increased skip; coordinate stable sorting for reliable large exports. Use the actual page structure of your server version.

Access data and sample data

All IDs and domains on this site are wildcards. Only enter access data locally, do not copy it into version management, tickets or protocols. Cookie files or cookie containers are to be treated like access data. Use a separate session for each test company.