JTL-WAWI API (Cloud) (1.0)

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://developer.jtl-software.com/products/erp/swagger/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.

Download OpenAPI description
Languages
Servers
Mock server
https://developer.jtl-software.com/_mock/products/erpapi/1.0-cloud/openapi/
https://api.jtl-cloud.com/erp/

info

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

Query Returns

Request

Query all returns

Query
returnNumberstring

Search for a specific return number.

customerIdinteger(int32)

Search for a specific customer Id.

salesOrderIdinteger(int32)

Search for a specific sales order Id.

returnStateIdinteger(int32)

Search for a specific return state.

pageNumberinteger(int32)

Number of the page of items to fetch.

pageSizeinteger(int32)

Size of the page that is specified by pageNumber.

Headers
api-versionstring

The requested API version

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'

tenant-idstring(uuid)required

Specify the TenantId in GUID Format

x-api-keystring(uuid)required

Specify the ApiKey from RegistrationProcess in Uuid Format

curl -i -X GET \
  'https://developer.jtl-software.com/_mock/products/erpapi/1.0-cloud/openapi/returns?customerId=0&pageNumber=0&pageSize=0&returnNumber=string&returnStateId=0&salesOrderId=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'api-version: string' \
  -H 'tenant-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-appid: string' \
  -H 'x-appversion: string' \
  -H 'x-runas: string'

Responses

Returns all non-pending returns.

Bodyapplication/json
TotalItemsinteger(int32)required

Gets or sets the total number of items available in the data source.

PageNumberinteger(int32)required

Gets or sets the current page number in the paginated list.

PageSizeinteger(int32)required

Gets or sets the number of items per page in the paginated list.

ItemsArray of objects(Return)required

Gets or sets the collection of items contained in the paged list.

Items[].​Idinteger(int32)required

Unique ID to identify a return.

Example: 123
Items[].​Numberstringrequired

The number of the return.

Example: "A1004465"
Items[].​ReturnDatestring(date-time)required

The date when the return was created.

Example: "2023-02-01T12:45:00.0000000+00:00"
Items[].​CustomerIdinteger(int32)required

The customer ID.

Example: 1005
Items[].​ExternalNumberstringrequired

An arbitrary external reference number for identifying the return, provided only during creation and cannot be changed afterward.

Example: "EX-12345"
Items[].​Origininteger(int32)required

Indicates the origin of the return, specifying where or how the return was initiated.0=None | 1=Email | 2=Manual | 3=Phone | 4=Fax | 5=FFN | 6=SCX | 7=RestAPI

Enum01234567
Example: 1
Items[].​CompanyIdinteger(int32)required

The company of the corresponding sales order.

Example: 1
Items[].​SalesOrderIdinteger(int32)required

The id of the sales order if the return has exactly on corresponding sales order.

Example: 1643
Items[].​StateIdinteger(int32)required

The id of the return state.

Example: 1005
Items[].​WarehouseIdinteger(int32)required

Id of the Warehouse.

Example: 1
Items[].​ExternalCommentstringrequired

The external comment of the sales order.

Example: "a replacement is needed"
Items[].​InternalCommentstringrequired

The internal comment of the sales order.

Example: "handle with care"
Items[].​Contactstringrequired

The contact of the return.

Example: "Mr. Robinson"
TotalPagesinteger(int32)read-only

Gets the total number of pages based on the total number of items and the page size.

HasPreviousPagebooleanread-only

Gets a value indicating whether there is a previous page available in the paginated list.

HasNextPagebooleanread-only

Gets a value indicating whether there is a next page available.

NextPageNumberinteger(int32)read-only

Gets the number of the next page if there is one; otherwise, returns the total number of pages.

PreviousPageNumberinteger(int32)read-only

Gets the number of the previous page. If there is no previous page, it returns 1.

Response
application/json
{ "TotalItems": 0, "PageNumber": 0, "PageSize": 0, "Items": [ {} ], "TotalPages": 0, "HasPreviousPage": true, "HasNextPage": true, "NextPageNumber": 0, "PreviousPageNumber": 0 }

Create Return

Request

Create a new return with associated items and packages.

Headers
api-versionstring

The requested API version

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'

tenant-idstring(uuid)required

Specify the TenantId in GUID Format

x-api-keystring(uuid)required

Specify the ApiKey from RegistrationProcess in Uuid Format

Bodyapplication/jsonrequired

The details of the return to create.

ReturnDatestring(date-time)

The date when the return was created.

Example: "2023-02-01T12:45:00.0000000+00:00"
ExternalNumberstring

An arbitrary external reference number for identifying the return, provided only during creation and cannot be changed afterward.

Example: "EX-12345"
CompanyIdinteger(int32)required

The company of the corresponding sales order.

Example: 1
SalesOrderIdinteger(int32)required

The id of the sales order if the return has exactly on corresponding sales order.

Example: 1643
WarehouseIdinteger(int32)required

Id of the Warehouse.

Example: 1
ExternalCommentstring

The external comment of the sales order.

Example: "a replacement is needed"
InternalCommentstring

The internal comment of the sales order.

Example: "handle with care"
Contactstring

The contact of the return.

Example: "Mr. Robinson"
ItemsArray of objects(CreateReturnLineItem)required

List of items included in the return.

Example: ""
Items[].​Quantitynumber(double)<= 2147483647required

The quantity of the line item.

Example: 2
Items[].​ReturnReasonIdinteger(int32)required

Unique ID to identify a return reason.

Example: 13
Items[].​ReturnReasonCommentstring

The comment corresponding to the return line item reason.

Example: "too small"
Items[].​SalesOrderLineItemIdinteger(int32)

Unique ID to identify a sales order item.

Example: 12
Items[].​DeliveryNoteLineItemIdinteger(int32)

Unique ID to identify a delivery note item.

Example: 12
PackagesArray of objects(CreateReturnPackage)

List of packages included in the return.

Example: ""
curl -i -X POST \
  https://developer.jtl-software.com/_mock/products/erpapi/1.0-cloud/openapi/returns \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'api-version: string' \
  -H 'tenant-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-appid: string' \
  -H 'x-appversion: string' \
  -H 'x-runas: string' \
  -d '{
    "ReturnDate": "2023-02-01T12:45:00.0000000+00:00",
    "ExternalNumber": "EX-12345",
    "CompanyId": 1,
    "SalesOrderId": 1643,
    "WarehouseId": 1,
    "ExternalComment": "a replacement is needed",
    "InternalComment": "handle with care",
    "Contact": "Mr. Robinson",
    "Items": "",
    "Packages": ""
  }'

Responses

The created return.

Bodyapplication/json
Idinteger(int32)required

Unique ID to identify a return.

Example: 123
Numberstringrequired

The number of the return.

Example: "A1004465"
ReturnDatestring(date-time)required

The date when the return was created.

Example: "2023-02-01T12:45:00.0000000+00:00"
CustomerIdinteger(int32)required

The customer ID.

Example: 1005
ExternalNumberstringrequired

An arbitrary external reference number for identifying the return, provided only during creation and cannot be changed afterward.

Example: "EX-12345"
Origininteger(int32)required

Indicates the origin of the return, specifying where or how the return was initiated.0=None | 1=Email | 2=Manual | 3=Phone | 4=Fax | 5=FFN | 6=SCX | 7=RestAPI

Enum01234567
Example: 1
CompanyIdinteger(int32)required

The company of the corresponding sales order.

Example: 1
SalesOrderIdinteger(int32)required

The id of the sales order if the return has exactly on corresponding sales order.

Example: 1643
StateIdinteger(int32)required

The id of the return state.

Example: 1005
WarehouseIdinteger(int32)required

Id of the Warehouse.

Example: 1
ExternalCommentstringrequired

The external comment of the sales order.

Example: "a replacement is needed"
InternalCommentstringrequired

The internal comment of the sales order.

Example: "handle with care"
Contactstringrequired

The contact of the return.

Example: "Mr. Robinson"
Response
application/json
{ "Id": 123, "Number": "A1004465", "ReturnDate": "2023-02-01T12:45:00.0000000+00:00", "CustomerId": 1005, "ExternalNumber": "EX-12345", "Origin": 1, "CompanyId": 1, "SalesOrderId": 1643, "StateId": 1005, "WarehouseId": 1, "ExternalComment": "a replacement is needed", "InternalComment": "handle with care", "Contact": "Mr. Robinson" }

Get Return

Request

Get a specific return

Path
returnIdinteger(int32)required

The id of the return.

Headers
api-versionstring

The requested API version

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'

tenant-idstring(uuid)required

Specify the TenantId in GUID Format

x-api-keystring(uuid)required

Specify the ApiKey from RegistrationProcess in Uuid Format

curl -i -X GET \
  'https://developer.jtl-software.com/_mock/products/erpapi/1.0-cloud/openapi/returns/{returnId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'api-version: string' \
  -H 'tenant-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-appid: string' \
  -H 'x-appversion: string' \
  -H 'x-runas: string'

Responses

Returns the return for the given id.

Bodyapplication/json
Idinteger(int32)required

Unique ID to identify a return.

Example: 123
Numberstringrequired

The number of the return.

Example: "A1004465"
ReturnDatestring(date-time)required

The date when the return was created.

Example: "2023-02-01T12:45:00.0000000+00:00"
CustomerIdinteger(int32)required

The customer ID.

Example: 1005
ExternalNumberstringrequired

An arbitrary external reference number for identifying the return, provided only during creation and cannot be changed afterward.

Example: "EX-12345"
Origininteger(int32)required

Indicates the origin of the return, specifying where or how the return was initiated.0=None | 1=Email | 2=Manual | 3=Phone | 4=Fax | 5=FFN | 6=SCX | 7=RestAPI

Enum01234567
Example: 1
CompanyIdinteger(int32)required

The company of the corresponding sales order.

Example: 1
SalesOrderIdinteger(int32)required

The id of the sales order if the return has exactly on corresponding sales order.

Example: 1643
StateIdinteger(int32)required

The id of the return state.

Example: 1005
WarehouseIdinteger(int32)required

Id of the Warehouse.

Example: 1
ExternalCommentstringrequired

The external comment of the sales order.

Example: "a replacement is needed"
InternalCommentstringrequired

The internal comment of the sales order.

Example: "handle with care"
Contactstringrequired

The contact of the return.

Example: "Mr. Robinson"
Response
application/json
{ "Id": 123, "Number": "A1004465", "ReturnDate": "2023-02-01T12:45:00.0000000+00:00", "CustomerId": 1005, "ExternalNumber": "EX-12345", "Origin": 1, "CompanyId": 1, "SalesOrderId": 1643, "StateId": 1005, "WarehouseId": 1, "ExternalComment": "a replacement is needed", "InternalComment": "handle with care", "Contact": "Mr. Robinson" }

Query Return Line Items

Request

Query all line items for a specific return

Path
returnIdinteger(int32)required

The id of the return that the line items belong to.

Headers
api-versionstring

The requested API version

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'

tenant-idstring(uuid)required

Specify the TenantId in GUID Format

x-api-keystring(uuid)required

Specify the ApiKey from RegistrationProcess in Uuid Format

curl -i -X GET \
  'https://developer.jtl-software.com/_mock/products/erpapi/1.0-cloud/openapi/returns/{returnId}/lineitems' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'api-version: string' \
  -H 'tenant-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-appid: string' \
  -H 'x-appversion: string' \
  -H 'x-runas: string'

Responses

The requested line items.

Bodyapplication/jsonArray [
Idinteger(int32)required

Unique ID to identify a return line item.

Example: 1123
ReturnIdinteger(int32)required

Unique ID to identify a return.

Example: 12
StateIdinteger(int32)required

The id of the return line item state.

Example: 1005
ItemIdinteger(int32)required

Unique ID to identify an item.

Example: 1000
Namestringrequired

Name of the position.

Example: "Awesome Binoculars"
SKUstringrequired

SKU of the line item.

Example: "ART2394871"
Quantitynumber(decimal)required

The quantity of the line item.

Example: 2
ReturnReasonIdinteger(int32)required

Unique ID to identify a return reason.

Example: 13
ReturnReasonCommentstring

The comment corresponding to the return line item reason.

Example: "too small"
ConditionIdinteger(int32)required

Unique ID to identify a condition.

Example: 13
ConditionCommentstringrequired

The comment corresponding to the return line item condition.

Example: "broken"
SalesOrderIdinteger(int32)required

Unique ID to identify a sales order file.

Example: 123
SalesOrderLineItemIdinteger(int32)required

Unique ID to identify a sales order item.

Example: 12
DeliveryNoteLineItemIdinteger(int32)required

Unique ID to identify a delivery note item.

Example: 12
]
Response
application/json
[ { "Id": 1123, "ReturnId": 12, "StateId": 1005, "ItemId": 1000, "Name": "Awesome Binoculars", "SKU": "ART2394871", "Quantity": 2, "ReturnReasonId": 13, "ReturnReasonComment": "too small", "ConditionId": 13, "ConditionComment": "broken", "SalesOrderId": 123, "SalesOrderLineItemId": 12, "DeliveryNoteLineItemId": 12 } ]

Query Return Packages

Request

Query all packages for a specific return

Path
returnIdinteger(int32)required

The id of the return that the packages belong to.

Headers
api-versionstring

The requested API version

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'

tenant-idstring(uuid)required

Specify the TenantId in GUID Format

x-api-keystring(uuid)required

Specify the ApiKey from RegistrationProcess in Uuid Format

curl -i -X GET \
  'https://developer.jtl-software.com/_mock/products/erpapi/1.0-cloud/openapi/returns/{returnId}/packages' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'api-version: string' \
  -H 'tenant-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-appid: string' \
  -H 'x-appversion: string' \
  -H 'x-runas: string'

Responses

The requested packages.

Bodyapplication/jsonArray [
Idinteger(int32)required

Unique ID to identify a return package.

Example: 1123
ReturnIdinteger(int32)required

Unique ID to identify a return.

Example: 12
TrackingIDstringrequired

The tracking Id of the package.

Example: "JJD0099999999"
ShippingMethodIdinteger(int32)

The shipping method.

Example: 3
ShippingMethodCustomstring

The custom shipping method name used for the return. This value may only be set if ShippingMethodId is not provided.

Example: "DHL"
]
Response
application/json
[ { "Id": 1123, "ReturnId": 12, "TrackingID": "JJD0099999999", "ShippingMethodId": 3, "ShippingMethodCustom": "DHL" } ]

cancellationreason

Operations

transactionStatus

Operations

invoice

Planned

Operations

customer

Operations

category

Operations

salesorder

Operations

deliverynote

Planned

Operations

appRegistration

Operations

wms

Operations

stock

Operations

accountingData

Planned

Operations

tax

Operations

offer

Operations

creditnote

Operations