JTL-WAWI API v1 (1.1)

Introduction

Welcome to the JTL-WAWI technical API documentation. This guide is here to help developers understand how our REST API works and how it can be integrated into your existing systems. We'll delve into the details of authentication and data manipulation processes, providing clear examples along the way. Whether you're a developer or an IT professional, this documentation aims to give you a practical understanding, laying the groundwork for effectively using the JTL-WAWI API to enhance your processes.

Authentication

You register your application with the API by sending a POST request with the required information and corresponding keys. You can find the exact request details at https://wawi-api.jtl-software.com/?#tag/appRegistration. This information has to include the following:

  • AppId
  • DisplayName
  • Description
  • Version
  • ProviderName
  • ProviderWebsite
  • MandatoryApiScopes

This data is crucial for identifying and registering your application with the API. The API uses it to generate a temporary authentication ID that allows your application to access the necessary resources. After successful validation of this information, you will receive the API key required for future authentication and API requests.

Before you can begin the registration process, you must open JTL-Wawi (new interface) and start the registration process under 'Admin->App registration'. Only at this point are you authorised to send the first API call. This step in JTL-Wawi ensures that your application is properly registered and has permission to use the API.

The API will send you an authentication ID in the form of a token. Once you have received this token and successfully completed the registration in JTL-Wawi, you will send another request to the API by including this authentication ID in the URL path.

After successful validation of this second request by the API and confirmation of the correct information, you will be provided with the actual API key. It is important to note that this API key will not be displayed again!

This API key will be used in the future to authenticate requests to the API. It is of utmost importance that you securely store the API key upon receipt, as it cannot be retrieved from any other location in the system.

HTTP Header

To make a successful API request, it is essential to include the correct authentication data in the request header. Upper case and lower case is ignored. The header should contain the following information:

  • X-AppID: This is the name of your application, in this case "MyApp/1.0.0". It is used to identify your application.
  • X-AppVersion: This is where the version number of your application is entered, in this case "1.0.0".
  • X-RunAs: Here, a JTL-Wawi user can be specified to perform an API call on their behalf (more details in the documentation).
  • X-ChallengeCode: You can enter any custom value here. The X-ChallengeCode is used during app registration and must be the same for all registration requests. The maximum length is 30 characters.
  • Authorization: The API key. Example: "Wawi 00000000-0000-00000-0000-000000000000"
Download OpenAPI description
Languages
Servers
Mock server
https://developer.jtl-software.com/_mock/products/erpapi/openapi/
http://127.0.0.1:52541/api/eazybusiness/

info

Operations

worker

Planned

Operations

features

Operations

printer

Operations

company

Operations

supplier

Operations

colorcodes

Operations

item

Operations

property

Operations

returnstate

Planned

Operations

onholdreason

Operations

returnreason

Planned

Operations

saleschannel

Operations

customerGroup

Operations

paymentmethod

Operations

odata

Operations

shippingmethod

Operations

warehouse

Operations

customerCategory

Operations

return

Operations

cancellationreason

Operations

transactionStatus

Operations

invoice

Planned

Operations

customer

Operations

category

Operations

salesorder

Operations

Create Sales Order Line ItemDeprecated

Request

DEPRECATED: Use Versioning with Header Create a new line item for a specific sales order

Path
salesOrderIdinteger(int32)required

The id of the sales order that the line items belong to.

Headers
x-appidstringrequired

This is the name of your application, in this case "MyApp/1.0.0". It is used to identify your application.

x-appversionstringrequired

This is where the version number of your application is entered, in this case "1.0.0".

x-runasstring

The User-Id as int or uuid to run the Request, a JTL-Wawi user can be specified to perform an API call on their behalf (more details in the documentation, Optional). To use the Header, you must have the needed Scope 'Application.RunAs'

X-SessionIdstring(uuid)

The id of a Session, in wich we call would be executed

Bodyapplication/jsonrequired

The line items to create.

Array [
ItemIdinteger(int32)

Unique ID to identify an item.

Example: 1000
Namestring

Name of the position.

Example: "Awesome Binoculars"
SKUstring

SKU of the sales order line item.

Example: "ART2394871"
Quantitynumber(double)[ 0 .. 2147483647 ]required

The quantity of the line item.

Example: 2
SalesUnitstring

The sales unit of the line item.

Example: "stk"
SalesPriceNetnumber(decimal)

The net sales price of the item. Only net or gross price can be entered. The other price will then be calculated.

Example: 16.8
SalesPriceGrossnumber(decimal)

The gross sales price of the item. Only net or gross price can be entered. The other price will then be calculated.

Example: 19.99
Discountnumber(decimal)

The discount of the line item.

Example: 5
PurchasePriceNetnumber(decimal)

The purchase price of the item.

Example: 13.46
TaxRatenumber(decimal)

The tax rate of the line item.

Example: 19
Noticestring

Notice for the line item.

Example: "Without sugar"
]
curl -i -X POST \
  'https://developer.jtl-software.com/_mock/products/erpapi/openapi/v1/salesOrders/{salesOrderId}/lineitems' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -H 'X-SessionId: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'x-appid: string' \
  -H 'x-appversion: string' \
  -H 'x-runas: string' \
  -d '[
    {
      "ItemId": 1000,
      "Name": "Awesome Binoculars",
      "SKU": "ART2394871",
      "Quantity": 2,
      "SalesUnit": "stk",
      "SalesPriceNet": 16.8,
      "SalesPriceGross": 19.99,
      "Discount": 5,
      "PurchasePriceNet": 13.46,
      "TaxRate": 19,
      "Notice": "Without sugar"
    }
  ]'

Responses

The created line items.

Bodyapplication/jsonArray [
Idinteger(int32)required

Unique ID to identify a sales order item.

Example: 1123
SalesOrderIdinteger(int32)required

Unique ID to identify a sales order.

Example: 12
ItemIdinteger(int32)required

Unique ID to identify an item.

Example: 1000
Namestringrequired

Name of the position.

Example: "Awesome Binoculars"
SKUstringrequired

SKU of the sales order line item.

Example: "ART2394871"
Typeinteger(int32)required

Type of the sales order line item. Type 0 -> free-text position | Type 1 -> item position0=Blank | 1=Item | 2=Shipping | 3=Coupon | 4=Voucher | 5=Payment | 6=ShippingSurcharge | 7=NewCustomerCoupon | 8=CashOnDelivery | 9=ShippingSurchargeItem | 10=Packing | 11=GiftForFree | 12=TrustedShops | 13=InterestPremium | 14=ProcessingFee | 15=Carton | 16=ReturnDelivery | 17=MultiPurposeVoucher | 18=MultiPurposeVoucherDigital | 19=SinglePurposeVoucher | 20=SinglePurposeVoucherDigital | 21=SinglePurposeVoucherRedemption

Enum0123456789
Example: 1
Quantitynumber(decimal)required

The quantity of the line item.

Example: 2
QuantityDeliverednumber(decimal)required

The quantity of the line item that has been delivered.

Example: 2
QuantityReturnednumber(decimal)required

The quantity of the line item that has been returned.

Example: 1
SalesUnitstringrequired

The sales unit of the line item.

Example: "stk"
SalesPriceNetnumber(decimal)required

The net sales price of the item. Only net or gross price can be entered. The other price will then be calculated.

Example: 16.8
SalesPriceGrossnumber(decimal)required

The gross sales price of the item. Only net or gross price can be entered. The other price will then be calculated.

Example: 19.99
Discountnumber(decimal)required

The discount of the line item.

Example: 5
PurchasePriceNetnumber(decimal)required

The purchase price of the item.

Example: 13.46
TaxRatenumber(decimal)required

The tax rate of the line item.

Example: 19
Noticestringrequired

Notice for the line item.

Example: "Without sugar"
]
Response
application/json
[ { "Id": 1123, "SalesOrderId": 12, "ItemId": 1000, "Name": "Awesome Binoculars", "SKU": "ART2394871", "Type": 1, "Quantity": 2, "QuantityDelivered": 2, "QuantityReturned": 1, "SalesUnit": "stk", "SalesPriceNet": 16.8, "SalesPriceGross": 19.99, "Discount": 5, "PurchasePriceNet": 13.46, "TaxRate": 19, "Notice": "Without sugar" } ]

Delete Sales Order Line ItemDeprecated

Request

DEPRECATED: Use Versioning with Header Delete a specific line item for a given sales order

Path
salesOrderIdinteger(int32)required

The id of the sales order that the line items belong to.

salesOrderLineItemIdinteger(int32)required

The id of the line item that the belongs to the sales order.

Headers
x-appidstringrequired

This is the name of your application, in this case "MyApp/1.0.0". It is used to identify your application.

x-appversionstringrequired

This is where the version number of your application is entered, in this case "1.0.0".

x-runasstring

The User-Id as int or uuid to run the Request, a JTL-Wawi user can be specified to perform an API call on their behalf (more details in the documentation, Optional). To use the Header, you must have the needed Scope 'Application.RunAs'

X-SessionIdstring(uuid)

The id of a Session, in wich we call would be executed

curl -i -X DELETE \
  'https://developer.jtl-software.com/_mock/products/erpapi/openapi/v1/salesOrders/{salesOrderId}/lineitems/{salesOrderLineItemId}' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'X-SessionId: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'x-appid: string' \
  -H 'x-appversion: string' \
  -H 'x-runas: string'

Responses

Bodyapplication/json
Response
application/json
null

Update Sales Order Line ItemDeprecated

Request

DEPRECATED: Use Versioning with Header Update a line item for a specific sales order

Path
salesOrderIdinteger(int32)required

The id of the sales order that the line items belong to.

salesOrderLineItemIdinteger(int32)required

The id of the line item that the belongs to the sales order.

Headers
x-appidstringrequired

This is the name of your application, in this case "MyApp/1.0.0". It is used to identify your application.

x-appversionstringrequired

This is where the version number of your application is entered, in this case "1.0.0".

x-runasstring

The User-Id as int or uuid to run the Request, a JTL-Wawi user can be specified to perform an API call on their behalf (more details in the documentation, Optional). To use the Header, you must have the needed Scope 'Application.RunAs'

X-SessionIdstring(uuid)

The id of a Session, in wich we call would be executed

Bodyapplication/jsonrequired

The item to update.

ItemIdinteger(int32)

Unique ID to identify an item.

Example: 1000
Namestring

Name of the position.

Example: "Awesome Binoculars"
SKUstring

SKU of the sales order line item.

Example: "ART2394871"
Quantitynumber(decimal)

The quantity of the line item.

Example: 2
SalesUnitstring

The sales unit of the line item.

Example: "stk"
SalesPriceNetnumber(decimal)

The net sales price of the item. Only net or gross price can be entered. The other price will then be calculated.

Example: 16.8
SalesPriceGrossnumber(decimal)

The gross sales price of the item. Only net or gross price can be entered. The other price will then be calculated.

Example: 19.99
Discountnumber(decimal)

The discount of the line item.

Example: 5
PurchasePriceNetnumber(decimal)

The purchase price of the item.

Example: 13.46
TaxRatenumber(decimal)

The tax rate of the line item.

Example: 19
Noticestring

Notice for the line item.

Example: "Without sugar"
curl -i -X PATCH \
  'https://developer.jtl-software.com/_mock/products/erpapi/openapi/v1/salesOrders/{salesOrderId}/lineitems/{salesOrderLineItemId}' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -H 'X-SessionId: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'x-appid: string' \
  -H 'x-appversion: string' \
  -H 'x-runas: string' \
  -d '{
    "ItemId": 1000,
    "Name": "Awesome Binoculars",
    "SKU": "ART2394871",
    "Quantity": 2,
    "SalesUnit": "stk",
    "SalesPriceNet": 16.8,
    "SalesPriceGross": 19.99,
    "Discount": 5,
    "PurchasePriceNet": 13.46,
    "TaxRate": 19,
    "Notice": "Without sugar"
  }'

Responses

Bodyapplication/json
Response
application/json
null

Configuration

Planned

Operations

deliverynote

Planned

Operations

appRegistration

Operations

login

Operations

logout

Operations

wms

Operations

stock

Operations

accountingData

Planned

Operations

tax

Operations

shipping

Development

offer

Operations

creditnote

Operations