return

Create Return

Create a new return with associated items and packages.

post/v2/returns

Request

  • Base URL
    https://scx-sbx.api.jtl-software.com
  • Auth
    • OAuth 2
      Authorization codehttps://auth.jtl-cloud.com/oauth2/auth
      Token URLhttps://auth.jtl-cloud.com/oauth2/token
      Scopesreturns.write
    • or OAuth 2
      Client credentials
      Token URLhttps://auth.jtl-cloud.com/oauth2/token
      Scopesreturns.write
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Headers

x-tenant-idstring uuid required

The tenant ID for the target ERP instance.

x-runasstring

The User-Id (int or uuid) on whose behalf the request is executed. Requires scope 'Application.RunAs'.

x-companyidstring

The Company-Id (int or uuid) of the company on whose behalf the request is executed.

Request body

returnDatestring date-time

The date when the return was created.

externalNumberstring

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

companyIdstring uuid

Represents a key for identifying a firm within the application.

salesOrderIdstring uuid
warehouseIdstring uuid
externalCommentstring

The external comment of the sales order.

internalCommentstring

The internal comment of the sales order.

contactstring

The contact of the return.

transmitToSalesChannelboolean

Indicates whether the return should be transmitted to the sales channel (e.g. SCX or Amazon).

Example request

{
  "companyId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
  "salesOrderId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
  "warehouseId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
  "items": [
    {
      "returnReasonId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
      "salesOrderLineItemId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
      "deliveryNoteLineItemId": "b45f6432-2462-4c6f-b00f-1d9d01000000"
    }
  ],
  "packages": [
    {
      "shippingMethodId": "b45f6432-2462-4c6f-b00f-1d9d01000000"
    }
  ]
}

Response

The created return.

idstring uuid
numberstring

The number of the return.

returnDatestring date-time

The date when the return was created.

customerIdstring uuid

Represents a unique key for identifying a customer in the JTL system.

externalNumberstring

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

origin0 | 1 | 2 | 3 | 4 | 5 | 6 | 7

0 = None, 1 = Email, 2 = Manual, 3 = Phone, 4 = Fax, 5 = FFN, 6 = SCX, 7 = RestAPI

companyIdstring uuid

Represents a key for identifying a firm within the application.

salesOrderIdstring uuid
stateIdstring uuid
warehouseIdstring uuid
externalCommentstring

The external comment of the sales order.

internalCommentstring

The internal comment of the sales order.

contactstring

The contact of the return.

transmitToSalesChannelboolean

Indicates whether the return should be transmitted to the sales channel (e.g. SCX or Amazon).

Example response

{
  "id": "b45f6432-2462-4c6f-b00f-1d9d01000000",
  "customerId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
  "companyId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
  "salesOrderId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
  "stateId": "b45f6432-2462-4c6f-b00f-1d9d01000000",
  "warehouseId": "b45f6432-2462-4c6f-b00f-1d9d01000000"
}

Changes

No recorded changes to this operation across all 1 revision of this API.