6 User Service

This section describes the User Service.

The User Service contains the following OpenAPI endpoint, which can be used to obtain the specification for the services it provides.
api/user/openapi

currentUser — GET

This section describes the currentUser API. This service retrieves the current user details which is most commonly leveraged by the Collect and Receive user interface.

Method

GET

URL

/api/user/v1/user/current

Request

There are no request parameters.

Responses

This section describes the responses of the currentUser API.

Response Code: 200

The current user.

The media type is application/json.

Example Value

{
  "created": "2024-07-24T06:08:23.004Z",
  "createdBy": "string",
  "updated": "2024-07-24T06:08:23.004Z",
  "updatedBy": "string",
  "id": <id>,
  "idcsId": "string",
  "locale": "en-US",
  "preferredLocationCode": "string"
}
User — Schema

Table 6-1 User

Element Name Required Data Type Description

created

NA

string($date-time)

The timestamp at which the record was created.

createdBy

NA

string

The identity of the user who created the record.

updated

NA

string($date-time)

The timestamp at which the record was last updated.

updatedBy

NA

string

The identity of the user who last updated the record.

id

NA

integer($int64)

ID

idcsId

Yes

string(255)

The user's IDCS id.

locale

NA

string(20)

The locale of the package dimension description. Default: en-US

preferredLocationCode

NA

string(10)

The user's preferred location code.

Reason Code: 400

The provided input is invalid.

The media type is application/json.

Example Value

[
  {
    "column": 0,
    "line": 0,
    "errorCode": 0,
    "errorMessage": "string",
    "moreInfo": {
      "code": "string",
      "description": "string"
    },
    "field": "string",
    "value": "string",
    "errorType": "INTEGRATION"
  }
]
Schema — Mapper Error Data

The table below describes the elements of the Mapper Error Data object.

Table 6-2 Mapper Error Data — Object

Element Name Required Data Type Description

column

NA

integer <int32>

The JSON file column number the error occurred on if known

line

NA

integer <int32>

The JSON file line number the error occurred on if known

errorCode

NA

integer <int32>

A numeric identifier for the type of error

errorMessage

NA

string

The unlocalized error message

moreInfo

NA

object

Additional information pertaining to the error

field

NA

string

The field. This is the last part of the path

value

NA

string

The JSON value that caused the error if known

errorType

NA

string

enum: INTEGRATION, INTERNAL, MAPPING, PARSING, VALIDATION An enumeration of specific known error types.

The following table describes the elements of the additional information pertaining to the error.

Table 6-3 More Info — Object

Element Name Required Data Type Description

code

NA

string

A code describing the error.

description

NA

string

An unlocalizable description describing the error.

Reason Code: 403

The user is not authorized to perform the action.

Reason Code: 500

The request failed.

updateUser — PUT

This section describes the updateUser API. This service updates the current user details which is most commonly leveraged by the Collect and Receive user interface.

Method

PUT

URL

/api/user/v1/user

Request

There are no request parameters.

The request body is application/json.

The ModelField request.

Example

{
  "created": "2024-07-24T06:17:25.424Z",
  "createdBy": "string",
  "updated": "2024-07-24T06:17:25.424Z",
  "updatedBy": "string",
  "id": <id>,
  "idcsId": "string",
  "locale": "en-US",
  "preferredLocationCode": "string"
}
User — Schema

Table 6-4 User

Element Name Required Data Type Description

created

NA

string($date-time)

The timestamp at which the record was created.

createdBy

NA

string

The identity of the user who created the record.

updated

NA

string($date-time)

The timestamp at which the record was last updated.

updatedBy

NA

string

The identity of the user who last updated the record.

id

NA

integer($int64)

ID

idcsId

Yes

string(255)

The user's IDCS id.

locale

NA

string(20)

The locale of the package dimension description. Default: en-US

preferredLocationCode

NA

string(10)

The user's preferred location code.

Responses

This section describes the responses of the updateUser API.

Response Code: 204

The request was processed successfully.

Reason Code: 400

The provided input is invalid.

The media type is application/json.

Example Value

[
  {
    "column": 0,
    "line": 0,
    "errorCode": 0,
    "errorMessage": "string",
    "moreInfo": {
      "code": "string",
      "description": "string"
    },
    "field": "string",
    "value": "string",
    "errorType": "INTEGRATION"
  }
]
Schema — Mapper Error Data

The table below describes the elements of the Mapper Error Data object.

Table 6-5 Mapper Error Data — Object

Element Name Required Data Type Description

column

NA

integer <int32>

The JSON file column number the error occurred on if known

line

NA

integer <int32>

The JSON file line number the error occurred on if known

errorCode

NA

integer <int32>

A numeric identifier for the type of error

errorMessage

NA

string

The unlocalized error message

moreInfo

NA

object

Additional information pertaining to the error

field

NA

string

The field. This is the last part of the path

value

NA

string

The JSON value that caused the error if known

errorType

NA

string

enum: INTEGRATION, INTERNAL, MAPPING, PARSING, VALIDATION An enumeration of specific known error types.

The following table describes the elements of the additional information pertaining to the error.

Table 6-6 More Info — Object

Element Name Required Data Type Description

code

NA

string

A code describing the error.

description

NA

string

An unlocalizable description describing the error.

Reason Code: 500

The request failed.