Item Conditions

This page is outdated. Please go to our new documentation under https://docs.fulfillmenttools.com/documentation.

Default values for item condition in the backend are not provided; however, it is possible to manage them on the client side. Like we are doing it with our app by setting the default value for item condition to "not damaged". If no additional conditions are specified through the backend, the conditions will not be displayed.

Adding predefined item conditions

You can add localized itemConditions to the returnConfiguration via API. The translation depends on the locale of the user using this endpoint and the tenantLocaleConfiguration as a fallback.

Get the current configuration for returns

get
Responses
200
Return config found.
application/json
get
GET /api/configurations/return HTTP/1.1
Host: 
Accept: */*
{
  "returnTypeConfiguration": {
    "type": "RETURN"
  },
  "availableItemConditions": [],
  "availableReturnReasons": [
    {
      "reasonLocalized": {
        "de_DE": "Beschädigt",
        "en_US": "Damaged"
      },
      "identifier": "A"
    }
  ],
  "allowTriggerRefund": false,
  "created": "2020-02-03T08:45:51.525Z",
  "lastModified": "2020-02-03T09:45:51.525Z",
  "version": 42
}

Change the tenant wide return configuration

put
Body
activebooleanRequiredDeprecatedDefault: true
availableItemConditionsanyOptional
availableReturnReasonsanyOptional
allowTriggerRefundbooleanOptional

If true, a refund can be triggered. If false, the endpoints to trigger a refund are disabled.

Default: false
Responses
200
The return configuration was successfully updated.
application/json
put
PUT /api/configurations/return HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 221

{
  "returnTypeConfiguration": {
    "type": "RETURN"
  },
  "availableItemConditions": [],
  "availableReturnReasons": [],
  "allowTriggerRefund": false,
  "created": "2020-02-03T08:45:51.525Z",
  "lastModified": "2020-02-03T09:45:51.525Z",
  "version": 42
}
{
  "returnTypeConfiguration": {
    "type": "RETURN"
  },
  "availableItemConditions": [],
  "availableReturnReasons": [
    {
      "reasonLocalized": {
        "de_DE": "Beschädigt",
        "en_US": "Damaged"
      },
      "identifier": "A"
    }
  ],
  "allowTriggerRefund": false,
  "created": "2020-02-03T08:45:51.525Z",
  "lastModified": "2020-02-03T09:45:51.525Z",
  "version": 42
}

Using item conditions in itemReturns

A user of our API can use these predefined conditions or provide their own ones when creating or updating itemReturnLineItem of an ItemReturn. The localized condition can be provided like this example:

itemConditionLocalized = { de_DE: 'gefällt nicht', en_US: 'do not like' }

When getting this ItemReturn via REST oder GQL, you will receive an additional field called itemCondition which contains only the localized value. This translation depends on the users locale.

Getting and setting these values via REST:

Get item returns

get
Authorizations
Path parameters
itemReturnJobIdstringRequired

item return job to read the item return for

Query parameters
startAfterIdstringOptional

entity to start after

sizeintegerOptional

number of entities to show

Default: 25
Responses
200
Get all item returns for a given item return job
application/json
Responseany
get
GET / HTTP/1.1
Host: %%HOST%%
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[]

Get item return by id

get
Authorizations
Path parameters
itemReturnJobIdstringRequired

item return job to read the item return for

itemReturnIdstringRequired

id of the item return you want to read

Query parameters
startAfterIdstringOptional

entity to start after

sizeintegerOptional

number of entities to show

Default: 25
Responses
200
Get a specific item return
application/json
get
GET / HTTP/1.1
Host: %%HOST%%
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "text",
  "created": "2020-02-03T08:45:51.525Z",
  "lastModified": "2020-02-03T09:45:51.525Z",
  "returnFacilityRef": "text",
  "status": "ANNOUNCED",
  "tenantOrderId": "text",
  "scannableCodes": [
    "text"
  ],
  "returnedLineItems": [
    {
      "itemConditionLocalized": {
        "de_DE": "Bschädigt",
        "en_US": "Damaged"
      },
      "itemConditionComment": "Upper corner damaged",
      "tenantArticleId": "a69006ba-7100-4b4d-a610-1ca28016a4eb",
      "scannedCodes": [
        "text"
      ],
      "status": "OPEN",
      "reasons": []
    }
  ]
}

Actions for a ItemReturn

post
Authorizations
Path parameters
itemReturnJobIdstringRequired

id of the Item Return Job

itemReturnIdstringRequired

id of the Item Return

Body
any ofOptional
or
or
Responses
200
Updated entity
application/json
post
POST / HTTP/1.1
Host: %%HOST%%
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 70

{
  "name": "STATUS_CHANGE",
  "itemReturnJobVersion": 1,
  "status": "ANNOUNCED"
}
{
  "id": "text",
  "processRef": "text",
  "originFacilityRefs": [
    "text"
  ],
  "status": "OPEN",
  "tenantOrderId": "text",
  "consumerAddresses": [
    {
      "additionalAddressInfo": "to care of: Mrs. Müller",
      "city": "Langenfeld",
      "country": "DE",
      "province": "NRW",
      "customAttributes": {},
      "houseNumber": "42a",
      "phoneNumbers": [
        {
          "customAttributes": {},
          "label": "text",
          "type": "MOBILE",
          "value": "text"
        }
      ],
      "postalCode": "40764",
      "street": "Hauptstr."
    }
  ],
  "scannableCodes": [
    "text"
  ],
  "shortId": "AS12",
  "returnableLineItems": [
    {
      "article": {
        "customAttributes": {},
        "imageUrl": "text",
        "tenantArticleId": "4711",
        "title": "Cologne Water",
        "weight": 1,
        "attributes": [
          {
            "category": "descriptive",
            "key": "%%subtitle%%",
            "priority": 100,
            "value": "585er Gold"
          }
        ]
      },
      "delivered": 1,
      "scannableCodes": [
        "text"
      ]
    }
  ],
  "itemReturns": [],
  "anonymized": false,
  "created": "2020-02-03T08:45:51.525Z",
  "lastModified": "2020-02-03T09:45:51.525Z",
  "version": 42
}

Last updated

Was this helpful?